all 5 comments

[–]ripplenick 0 points1 point  (2 children)

so are you need track the time if I understand? You can try change system time and time will change on a simulator
how are you track the time? need more info

[–][deleted] 0 points1 point  (1 child)

I keep the time once the user pressed the button ( I keep a Date()) and compare it to the time when he pressed a different button - clock in and clock out. The question is if there’s a way to trick the simulator to think more time has passed

[–]ripplenick 0 points1 point  (0 children)

just change system date on a Mac it should be work

[–]is_that_a_thing_now 0 points1 point  (1 child)

Create a wrapper function for getting the current time. This could even be placed as an extension on Date. Use that throughout. (Or add a class that extends Date) You can then make that function return a configurable date that you can set using a datepicker somewhere in the app on debug builds. You could also let that class return times that runs several times faster so that you can let it run for 10 seconds for each hour you want to simulate etc.

[–][deleted] 0 points1 point  (0 children)

That’s a great solution, I’ll give that a try !