Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time in millisec

Status
Not open for further replies.

jbpelletier

Programmer
Sep 8, 2001
232
CA
hi...

Using:

time_t t1,t2;
(void) time(&t1);
//some code
(void) time(&t2);
cout<<((int) t2-t1);

i always get the number of seconde between t1 and t2 even if i dont cast it as an int... how can i get the time in millisec ... or at least less than by seconde increment...

(in a dos appz)...
jb
 
Due to the structure of time_t, I don't think it is possible. I did find that bios_time will give you fraction of seconds since it's ticks are 18.2/second. Note: this info may be out of date.

James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
i havent really found something but tanx,
but..im sure there is an ez way to do that...
jb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top