Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: ATU on November 26, 2018, 12:13:04 PM
-
Is there a millisecond value for the system clock?
-
You can't render the full system clock in 32 bits, but TICKms() in the MATH box will return 32 bits worth of milliseconds from the system clock.
-
I was thinking about adding a timer to top of scan and reset it on the leading edge of the System 1 second bit. Is that bit tied to the system clock or is it totally a different thing? Do I need to monitor the seconds from the actual time clock and reset the millisecond timer every time it changes? I know its not perfect, but if I am within 50ms, that would work for my app
-
$1Second is just a free running counter that toggles every 500ms. It has no direct relationship to the system clock.
If you reset a timer on a delta contact of $LocalTime that should get you real close to what you want.
You could also use STRPRINT to do a timestamp, but then you'd have to pick the string apart...it would be slow.