Right, that was my question. On mainnet, should I expect the function to run once every second? That way i can set a check for n >= 60, and if the condition is met, set n to 0 and execute my logic, otherwise just increment n
Is Time.now() in Motoko calling ic0.time? Not very familiar with Motoko
Otherwise wouldn’t Time.now() introduce local non -determinizm when used to make decisions in execution?
At least that is what I got from @akhilesh.singhania recent video cast on YouTube. @nomeata suggests here([quote=“nomeata, post:4, topic:9268”]
You can use ic0.time to get a suitable timestamp (but careful, don’t assume it to be_strictly_ monotonous – but that should be the same for a system clock with low resolution)
[/quote]
)
@Icdev2dev, you seem to be repeatedly worried about non-determinism creeping in if canisters do the wrong thing (here, in the discussion of stable memory). Rest assured: Canisters run in a carefully constructed sandbox, and nothing they can do can endanger determinism. (Else the whole IC would fall apart, and it it hasn’t, yet, right, so Q.E.D.)