Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Easier way to make a timer...

Author
Message
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 21st Aug 2010 09:54
I made a timer but it seems like too many lines for DBpro. Is there a command or an easier way to convert seconds into minutes and hours?



Oldtimer# being the recorded timer() at the beginning of the application.

Ventures of the worlds around us are only limited by imagination.
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 21st Aug 2010 10:59
I just start them as separate variables and just use the timer to add to the variables every second.



Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Aug 2010 00:48 Edited at: 24th Aug 2010 00:50
Here's an example with lots of comments. It basically uses unit conversion factors (converting miliseconds to hours, etc.) to figure divide up the time. Hopefully the comments explain it well enough:

<--- (Contains helpful comments)

It's not as long as it looks...

<--- (Same as above but without almost no comments at all)


Guns, cinematics, stealth, items and more!

Login to post a reply

Server time is: 2024-11-24 11:29:20
Your offset time is: 2024-11-24 11:29:20