from pyfbsdk import FBSystem, FBTime, FBSleep, FBMessageBox
lTs1 = FBSystem().SystemTime
lSleepTimeMS = 1234
FBSleep( lSleepTimeMS )
lTs2 = FBSystem().SystemTime
lTdiff = lTs2 - lTs1
FBMessageBox( "Actual sleep time",
"Sleep time requested: %.3f seconds\nActual sleep time : %.3f seconds" %
(( lSleepTimeMS / 1000.0 ),
(lTdiff.GetMilliSeconds() / 1000.0)),
"OK",
None,
None )
lTs1 = FBTime.OneSecond
lTs2 = FBTime.OneMinute
lTdiff = lTs2 - lTs1
FBMessageBox( "Time Math",
"one minutues - one second = %.0f seconds" %
(lTdiff.GetMilliSeconds() / 1000.0),
"OK",
None,
None )
del( lTs1, lTs2, lTdiff, lSleepTimeMS, FBSystem, FBTime, FBSleep, FBMessageBox )