Page 1 of 1

System time including tenths of a second

Posted: Sat Aug 14, 2010 11:23 pm
by phaworth
Running on OSX and want to get the current time including tenths of a second. The OSX Date & Time system setting allows me to define a time format that includes tenths of a second so I did that for the Long format but if I "put the long system time" in the message box, I only see hours, minutes, and seconds, no tenths.

Anyone know how I can get the tenths of a second to show up?

Thanks,
Pete

Re: System time including tenths of a second

Posted: Sat Aug 14, 2010 11:45 pm
by bn
Pete,
the only way I found is:

Code: Select all

on mouseUp
   put the milliseconds into tmSec
   put char 1 to -4 of tmSec into tSec
   convert tSec from seconds to  long system time
   -- convert tSec from seconds to  long time
   put ":" & char -3 of tmSec after word 1 of tSec
   put tSec
end mouseUp
maybe there are other ways
regards
Bernd

Re: System time including tenths of a second

Posted: Tue Aug 17, 2010 11:44 pm
by phaworth
Thanks Bernd, that should work fine. Hadn't found the milliseconds function!
Pete