Welcome, Guest. Please login or register.

Author Topic: Time to string, but with microseconds (sounds crazy I know)...  (Read 1210 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2869
Hi. There are 2 Dos functions that make getting a date and time to a string very easy: DateStamp() and DateToStr().
However I also want to get microseconds, wich DateToStr() doesn't give.
Note: I prefer precision over efficiency on this one, but I'd like to get both or just know how I could do it otherwise (even if less precise)...8-)

I have imagined two ways:
1- To use GetSysTime() and then convert it to strings using Amiga2Date() and then RawDoFmt(), also using custom code to convert the microseconds part (these functions seem to just ignore it or maybe they take microseconds into account but round to seconds).

2- To use DateStamp() and DateToStr() but also write custom code to convert the remaining given ticks in current minute to seconds and microsseconds ?

1 seems to be more accurate (?) (and I want that), but 2 more efficient and simpler.
By the way, the DateStamp autodoc states ticks are assumed to be 50 per second. Isn't that untrue if you're running a screenmode >15Khz ?
\\"We made Amiga, they {bleep}ed it up\\"