News:

  • May 18, 2024, 04:31:52 AM

Login with username, password and session length

Author Topic: Clock Milliseconds  (Read 865 times)

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2121
  • YKPAIHA
    • ATU, Inc.
Clock Milliseconds
« on: November 26, 2018, 12:13:04 PM »
Is there a millisecond value for the system clock?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5996
  • Yes Pinky, Do-more will control the world!
Re: Clock Milliseconds
« Reply #1 on: November 26, 2018, 12:39:20 PM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ATU

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 2121
  • YKPAIHA
    • ATU, Inc.
Re: Clock Milliseconds
« Reply #2 on: November 26, 2018, 12:54:20 PM »
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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5996
  • Yes Pinky, Do-more will control the world!
Re: Clock Milliseconds
« Reply #3 on: November 26, 2018, 01:15:33 PM »
$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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO