Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 01:33 17 May 2022 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMBasic for Windows - pre-alphas

     Page 17 of 17    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 6117
Posted: 01:24pm 04 Apr 2022
Copy link to clipboard 
Print this post

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: Australia
Posts: 937
Posted: 10:53pm 05 Apr 2022
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2419
Posted: 09:23am 06 Apr 2022
Copy link to clipboard 
Print this post

  Chopperp said  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


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
CMM2 Welcome Tape, Creaky old text adventures
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 937
Posted: 11:58am 07 Apr 2022
Copy link to clipboard 
Print this post

  thwill said  * 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.


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 Kingdom
Posts: 2419
Posted: 12:30pm 07 Apr 2022
Copy link to clipboard 
Print this post

  Chopperp said  Tom, were you actually able to use the TIMER as a separate clock after all that?


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
CMM2 Welcome Tape, Creaky old text adventures
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 937
Posted: 01:04pm 07 Apr 2022
Copy link to clipboard 
Print this post

Hi Tom

Thanks for that.

Something to ponder. (Probably well above my pay grade as well)

Keep up the good work.

Brian
ChopperP
 
     Page 17 of 17    
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2022