Latest Uploads
Mutant Mon ... (Blitz3D)

steve_ancell

Mutant Mon ... r package.

steve_ancell

image-13-0 ... -01-38.jpg

Jayenkai

Mutant Monty Remake

steve_ancell

hai.jpg

CodersRule

SillyAddition.png

Jayenkai

Code Snippets > Timing ( Created 17 January 2010 | Last Edited 17 January 2010)

Timestamp by Jayenkai | No Votes
Written in
Blitz Max
Why doesn't BlitzMax have a timestamp?!

This oughta work for most stuff.. Doesn't keep mills, but they're addable if you're bored.

-->

Latest Comments

Posted : Sunday, 17 January 2010, 10:54
Afr0


FFS

Classes Jay, use classes!

Posted : Sunday, 17 January 2010, 11:51
JL235


Afro FFS

Classes Jay, use classes!

For something this simple, I disagree. They are utility functions that don't preserve state between calls. Why do they need to be in their own class? Their own file or module is enough to seperate them out from the rest of the application or library.

However I would say that you should be aware that different users will generate different timestamps because of timezone differences. So essentially only rely on this for local stuff, don't rely on it for say a scoreboard!

Posted : Sunday, 17 January 2010, 11:58
Jayenkai


Yeah, I've currently decided against online scores, since.. well, it's all kinda mangled up at the minute.

And, these aren't "Unix" timestamps, they're just bog-standard ones, but they are 100% reusable, and as such, completely worthwhile having!!


. and, in fact, they ARE for a local scoreboard, so you can flick through a nice graph, with all your previous scores on it..
Mmmmmm....
Graph!!!

Posted : Sunday, 17 January 2010, 16:10
Afr0


I just noticed you're generating big-ass numbers.
Might wanna look into Big Integers.

Posted : Sunday, 17 January 2010, 16:31
JL235


He's using longs, which is standard for holding time values.

In what way would big integers be more appropriate?

|edit| When I said don't use them for a score board, I meant for an online scoreboard. |edit|

Posted : Sunday, 17 January 2010, 16:40
Jayenkai


It shouldn't ever hit anything too big.
Or at least, not until the year 10000, (he says, giving it a run through) whereby the 4 digit display thing kinda starts to limit the year number.

Posted : Monday, 18 January 2010, 10:19
Jayenkai


I've not got to the stage of messing with mods yet. At the minute, I'm trying to keep everything "Code Only", so I know it'll (should!) run on all 3 main targets without all the faffing about.

The number of Blitz things that have been broken, 'cos I've lost track of certain versions of specific userlibs, or because I updated one userlib, and it broke something else..
It's completely insane, so I'm trying to keep things in the code folder as much as possible.

Maybe later!!

Posted : Monday, 18 January 2010, 15:03
Jayenkai


Would that happily work on all 3 targets? (Win/Linux/Mac)
I'm being very very aware of completely screwing this up, and am taking baby steps so I know what broke it all!

(although I've still no mac to test with, so it'll all come crashing down anyway!!)

Posted : Monday, 18 January 2010, 21:08
mindstorm8191


Or at least, not until the year 10000,


You'd better fix that now, Jay, or else it'll be Y2K all over again! lol

Posted : Tuesday, 19 January 2010, 02:56
Jayenkai


I've lived with the Millisecs thing for so long, avoiding it is second nature, especially when dealing with the whole wraparound thing. (does it still do that?)

OK, I'll have a piss about with this stuff later.
Today's task is to get this test engine finished, and uploaded for people to try out.
Using "Test Engine" as "AGameAWeek"..
Only if it's good enough!!

Latest Posts
Mutant Monty update.
steve_ancell Wed 09:41
Android Dev Test Doohickey
Jayenkai Tue 09:58
Aminal Xing Knew Leef
Jayenkai Tue 04:25
Spark
dna Mon 17:24
HoboTile
steve_ancell Sun 10:07
Hoover
steve_ancell Sat 21:53
Scrabble Rabble
Jayenkai Fri 08:13
Not Fit for Purpose
Jayenkai Thu 20:29
Happy Birthday, Krakatomato
steve_ancell Thu 18:03
How Deep is Your Code?
Hotshot Thu 14:35
More

Latest Items
Blog : Snow Worklog
Cower Mon 12:23
Dev-Diary : Mutant Monty: Amstrad CPC to Windows conversion
steve_ancell Sat 19:12
Showcase : MLG : Microscopic Lifeform Genocide
rockford Wed 09:24
News : Newsletter #176
Jayenkai Sat 04:49
News : Newsletter #175
Dabz Tue 09:38
Blog : Snow: More Material Junk
Cower Sat 23:17
Techy : AppleTV
Jayenkai Thu 09:40
Blog : Graphviz
steve_ancell Sat 14:17
Pets : Top-Down Shadow Hack
Jayenkai Tue 05:52
Snippet : JNKrunch v1.0
Jayenkai Sat 07:20
News : Newsletter #173
waroffice Fri 04:47
Blog : Material Loading
Cower Fri 02:08
Pets : I Done Won A Thing
shroom_monk Sun 11:31
Pets : Repurposing A Lexer
Cower Mon 22:06
Bah : Feeling a Little Angry
spinal Mon 11:26
More

Who's Online
shroom_monk
Thu, at 01:28
spinal
Thu, at 01:10
therevillsgames
Thu, at 01:10
CodersRule
Wed, at 23:23
Dabz
Wed, at 22:34
Evil Roy Ferguson
Wed, at 21:24
dna
Wed, at 20:23
steve_ancell
Wed, at 19:36
Jayenkai
Wed, at 18:28
9572AD
Wed, at 17:04
Link to this page
Site : Jayenkai 2006-Infinity |
MudChat's origins, BBCode's former life, Image Scaler.