Converting from ticks or milliseconds...

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Converting from ticks or milliseconds...

Post by Mag » Wed Feb 19, 2014 6:07 pm

Hi Paul,

Thinking a bit better about it, since I have also to manage the interface, maybe it's better not to burden too much the scrip with hundredths. Ultimately I do not think it would be very reliable. :oops:

To do a countdown, as you advise me to do the script?

paulsr
Posts: 222
Joined: Thu Jul 19, 2012 9:47 am
Location: Khanom, Nakhon Si Thammarat, Thailand
Contact:

Re: Converting from ticks or milliseconds...

Post by paulsr » Thu Feb 20, 2014 4:24 am

I think you probably also have to consider the human interface ... in other words, can a human react within a hundredth of a second to stop/start your timer?

Just a thought...

--paul

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Converting from ticks or milliseconds...

Post by Mag » Thu Feb 20, 2014 9:45 pm

paulsr wrote:I think you probably also have to consider the human interface ... in other words, can a human react within a hundredth of a second to stop/start your timer?

Just a thought...

--paul

I Paul, yes, absolutely true. It remains only the case in which someone would record the screen with a video camera.

Einherjar
Posts: 18
Joined: Thu Dec 12, 2013 7:38 pm

Re: Converting from ticks or milliseconds...

Post by Einherjar » Thu Jul 10, 2014 8:13 pm

Sorry to drag up an old post guys, but I have a question / request regarding timers - all of my attempts end up with me falling into a rather uncomfortable ctrl+alt+del loop.

I'm basically trying to create some sort of game play where a number pops up on screen, say "3" and you have to press a button to start the timer and then press it again to stop the timer as close to the number as possible.

From there, I would like to find the difference between the numbers and display the 'score'. The score would be the 'TimeRemaining' - the 'Difference' - once the player is reduced down to TimeRemaining => 0 the game ends.

I would like this to be as accurate as possible, so I'm thinking milliseconds.

Any help would be much appreciated as I have used the code found in the first page of this thread but it isn't as accurate as I would like.

Thanks.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”