UNIX timestamp 
Author Message
 UNIX timestamp

is there a function in c++ that one can call to get a unix  timestamp?   If
not, what is the best way for me to get a time that i can compare with
another time? thanks for the help.


Sat, 22 Jan 2005 00:42:20 GMT  
 UNIX timestamp


Quote:
> is there a function in c++ that one can call to get a unix  timestamp?
If
> not, what is the best way for me to get a time that i can compare with
> another time? thanks for the help.

The same function you'd call in Unix?

Just what exactly are you looking for?  For example, time_t values on
Windows are identical to Unix.

-cd



Sat, 22 Jan 2005 02:03:02 GMT  
 UNIX timestamp
Im writing an application where I have to issue keys that will expire in a
set amount of time... what i want to do is compare the current timestamp
with the set time to expire timestamp, and compare them.  I have not used a
function in unix; however there was a function that i used to call in PHP
that would give me the time stamp

    Jose



Sat, 22 Jan 2005 03:14:45 GMT  
 UNIX timestamp


Quote:
> Im writing an application where I have to issue keys that will expire in a
> set amount of time... what i want to do is compare the current timestamp
> with the set time to expire timestamp, and compare them.  I have not used
a
> function in unix; however there was a function that i used to call in PHP
> that would give me the time stamp

You'll have to find out from the PHP camp how to get an equivalent time in
C/C++ then.   Most likely, it's just the result of the time() function, or
possibly a millisecond version of that same time.

-cd



Sat, 22 Jan 2005 04:18:38 GMT  
 UNIX timestamp

Quote:


> > Im writing an application where I have to issue keys that will expire in
a
> > set amount of time... what i want to do is compare the current timestamp
> > with the set time to expire timestamp, and compare them.  I have not
used
> a
> > function in unix; however there was a function that i used to call in
PHP
> > that would give me the time stamp

> You'll have to find out from the PHP camp how to get an equivalent time in
> C/C++ then.   Most likely, it's just the result of the time() function, or
> possibly a millisecond version of that same time.

http://www.php.net/manual/en/function.time.php

In short, PHP's time() function returns the same thing as the C/C++ time()
function.



Sat, 22 Jan 2005 04:44:55 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Build timestamp

2. a predefined compile-timestamp token?

3. How to maintain TimeStamp consistency across Time Zones?

4. finding file creation timestamp

5. Getting Assembly compilation timestamp

6. Decoding the VMS 64bit timestamp...

7. getting timestamp from time()

8. timestamp

9. can C access timestamps?

10. Can C pick up the timestamp of file

11. timestamp

12. Change file -> change timestamp of file

 

 
Powered by phpBB® Forum Software