About TDUSRTIMER and AcDbDate

By Augusto Goncalves

The TDUSRTIMER system variable does not store the elapsed milliseconds, but instead stores the time elapsed form the last reset in a Julian date format. The easiest way to get the time elapsed in seconds is to use the AcDbDate class.

void ASDKgetTime()    {      struct resbuf rUsrTime;      acedGetVar(_T("TDUSRTIMER"), &rUsrTime);           AcDbDate testDate ;      testDate.setJulianFraction(rUsrTime.resval.rreal) ;           acutPrintf (        _T("nMinute: %dnSec: %dnMilisec: %d"),         testDate.minute (),        testDate.second (),         testDate.millisecond ()) ;    }

Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading