Passed Time



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/06/2008 at 13:22, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.5 
    Platform:      
    Language(s) :     C++  ;

    ---------
    Hey

    I wonder how this nice little timer is made, that shows up to the bottom left of the C4D GUI when a rendering starts.

    For general I just want to know, how to implement something to grab the time passed between plugin start and the return result from the main routine. In my case I want to grab the calculation time of the mesh and display it somehow (on the wishlist is a stylish timer like the renering one, but I also use the time diplayed with GePrint())



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 19/06/2008 at 16:50, xxxxxxxx wrote:

    For time passage, I use GeGetTimer(). This returns the current time in milliseconds.

    When you want to start timing, do this:

    LONG starttime = GeGetTimer();

    When you want to get the end time, do something like this (here I'm printing seconds elapsed) :

    GePrint("Keyframing Time: "+RealToString((GeGetTimer()-starttime) * 0.001)+" seconds");

    Or simply:

    LONG endtime = GeGetTimer();
    ...
    LONG elapsed = endtime-starttime;

    As for the other part, use a ProgressBar with StatusSetBar(). This won't be in the Picture window for the external render like Cinema 4D but where the user has the Status bar (usually at the bottom).



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/06/2008 at 05:34, xxxxxxxx wrote:

    Thanks Robert, thats what I needed :>


Log in to reply