Page 1 of 1
Need system time in seconds - Solved
Posted: Thu Aug 13, 2015 11:34 pm
by DR White
I am trying to build a timer for a game. I need to subtract the start time from the finish time. I also need to display the current lapse time every second.
I have tried the following code, but it did not give me system time in seconds:
convert the date && the time to seconds
put the date && the time into field "Display"
Any suggestions would be appreciated,
David
Re: Need system time in seconds - But code does not work
Posted: Fri Aug 14, 2015 5:31 am
by Dixie
This will give you the time 'now'... It might be worth you having a look at 'dateItems' in the dictionary...
Re: Need system time in seconds - But code does not work
Posted: Fri Aug 14, 2015 5:34 am
by FourthWorld
"the long time" may also be useful, as it provides a readable time format that includes seconds, e.g. "9:35:51 PM".
Re: Need system time in seconds - But code does not work
Posted: Fri Aug 14, 2015 12:41 pm
by DR White
Richard,
I tried "the long time" approach yesterday, but could not get it converted to seconds.
--------------------------------------------------
Dixie,
"Put the seconds" works great,
Thank each of you for your help,
David
Re: Need system time in seconds - Solved
Posted: Fri Aug 14, 2015 7:21 pm
by Randy Hengst
You might have already noticed this, but you can also
put the long seconds
Re: Need system time in seconds - Solved
Posted: Fri Aug 14, 2015 11:32 pm
by dunbarx
Each format has its strrngths and weaknesses, and some are subsumed by others.
But what was wrong with the "long time"?
Code: Select all
on mouseUp
get the long time
convert it to seconds
answer it
end mouseUp
Craig Newman