![]() |
Forum Index : Microcontroller and PC projects : MMBasic for Windows - pre-alphas
![]() ![]() |
|||||
Author | Message | ||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10067 |
Sorry but makes no sense to allow TIME$ to return a different value from the system time but see the beta thread where thwill has provided you with the concept for a solution using the updated beta just posted |
||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1090 |
OK. Got a workable solution using TIMER & resetting that on the incoming GPS time. (Not sure which part of Tom's stuff you were referring to in the other post. Most of it goes way over my head ![]() Brian ChopperP |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
I pretty much suggested* exactly what you did - great minds ![]() * OK, I didn't explicitly suggest it, I investigated whether it was possible to use the TIMER as a separate clock and then reported an error I found along the way. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1090 |
Tom, were you actually able to use the TIMER as a separate clock after all that? Brian ChopperP |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4251 |
Hi Brian, I didn't investigate much further, but in theory: ' Initialise the Timer from the system clock: Timer = Epoch(Now) * 1000 ' Print/query the Timer as if it were a clock: Print DateTime$(Timer \ 1000) At this point the Timer is independent of the clock but ticking at approximately the same speed. I imagine they will slowly drift apart since if you are online the system clock will (probably) be receiving updates from a time service and even if you are offline they may not be getting updated via exactly the same mechanism - the details are outside my pay grade ![]() Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1090 |
Hi Tom Thanks for that. Something to ponder. (Probably well above my pay grade as well) Keep up the good work. Brian ChopperP |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |