Need system time in seconds - Solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Need system time in seconds - Solved
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
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
Last edited by DR White on Fri Aug 14, 2015 12:42 pm, edited 3 times in total.
Re: Need system time in seconds - But code does not work
Code: Select all
put the seconds
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Need system time in seconds - But code does not work
"the long time" may also be useful, as it provides a readable time format that includes seconds, e.g. "9:35:51 PM".
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Need system time in seconds - But code does not work
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
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
-
- VIP Livecode Opensource Backer
- Posts: 157
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Need system time in seconds - Solved
You might have already noticed this, but you can also
put the long seconds
put the long seconds
Re: Need system time in seconds - Solved
Each format has its strrngths and weaknesses, and some are subsumed by others.
But what was wrong with the "long time"?
Craig Newman
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