Hi, I need to save in a file the time at which the app started the first time (with some particular input parameter) and then read it the next times the app start in order to have information on the time passed from the first time the app started. I mean... let's suppose I start the app at 12:00 and then I close it. Later I start it again at 13, I need that the app see the previous time by the file and calculate that 1 hour has passed. Doing as I do I receive the error: Bad argument to Duration. Any help? Thanks.
Clock.Now is an Instant, which can not be saved as text into a file.
Instead, use Clock.SystemTime, which returns Milliseconds from 1970.
Read the tool tip for the Duration block to see what it eats, Milliseconds or Instants (I forget).
Yes great! You are right! It works now. Thanks a lot.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.