-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|83|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Variables


 
Jayenkai
Created : 15 April 2007
Edited : 15 April 2007
Language : Blitz

Formatted Milliseconds

Display the time in a series of ways.

A nice handy function.
Takes a millisecond value, and a formatting string, and returns a neatly formatted string containing the time.
A few examples are included.
Easily expandable to include more formatted styles and other things, too. (But you're still limited to Blitz's 32 bit integers, so I'm not sure how many days you'd be able to count.)


 

Comments


Sunday, 15 April 2007, 08:07
Jayenkai
Half an hour later I actually came across an annoyance with my own code, so I shoved $'s onto the formatting code. Should work a little better now!

And I've just found that you can get about 24 days into the 32bit integer..
Sunday, 15 April 2007, 08:17
mike_g
And I've just found that you can get about 24 days into the 32bit integer


I think that will do
Sunday, 15 April 2007, 18:49
HoboBen
Do a Cobra port, do a cobra port
I might, actually, unless you want to/don't want me to.
Have you got Cobra yet, Jay?
Cheers
Sunday, 15 April 2007, 20:46
Jayenkai
I haven't bothered with Cobra yet, due to my overwhelming urge to never actually manage to complete anything!
I'm sticking with Blitz, I think. Or at least, for a little while longer, anyway.