Author Topic: OT program question  (Read 1696 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I was just playing around with something for some reason and I needed to get the current time in milliseconds so I could get a floating point frame time, time.h/time() gives me seconds, were is the function for milliseconds, I have tryed google and it hasn't provided anything usful and I need to get to sleep.

that should have been OT, I do so need sleep
« Last Edit: October 29, 2003, 12:04:08 am by 561 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
To be honest Bob, my memory of STL is a little hazy.  However, if memory serves, the time class may not be helpful, as all it measures time in seconds.  As for more general programming help, I'm afraid I'm not of much use.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Thread title edited. ;)

 
If it only needs to work in Windows, I believe the easiest way is to use timeGetTime(), look it up from MSDN

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
clock() - milliseconds since beginning of this thread

only really usefull for time differences that need high accuracy
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 
Kazan, clock() returns the tick count. You'd have to multiply with 1000/CLK_TCK to get milliseconds.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
are there stl grapics ruteens
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Fry_Day

  • 28
GetTickCount() is a standard windows API function that returns the number of milliseconds since the computer has been turned on