InfiniTimeOrg / InfiniSim

Simulator for InfiniTime user interface without needing a PineTime
GNU General Public License v3.0
167 stars 68 forks source link

Add warning that std::chrono::system_clock is not supported on hardware even though it may work fine in the sim #92

Open kestara opened 1 year ago

kestara commented 1 year ago

(This confusion has happened at least two times link 1 link 2)

Idea: If use of std::chrono::system_clock is detected (unsure how) then add a warning in the console that on the watch this will result in undefined behaviour.

NeroBurner commented 1 year ago

I very much like the idea, but sadly I don't know how to pull it off.

lmamane commented 1 month ago

Here's a proof of concept. Works on GNU/Linux with gcc at least, other platforms to be tested.

stdchrono_abort.diff.txt

NeroBurner commented 1 month ago

That looks interesting to say the least! Could you open a PR with those changes for easier workflow on my side and attribution for your work? 🙇‍♂️

lmamane commented 4 weeks ago

Yes, sure. I'll polish it it up and make a PR out of it. I'm prioritising finishing the app I'm developing first, then hopefully I'll get back to that. It is going nicely :)

Nice to see you are interested and responsive.

lmamane commented 2 weeks ago

Assuming my pull request #2162 in InfiniTime is merged, this will become moot and can be closed.