time(2) System Calls time(2)NAME
time - get time
SYNOPSIS
#include <sys/types.h>
#include <time.h>
time_t time(time_t *tloc);
DESCRIPTION
The time() function returns the value of time in seconds since 00:00:00 UTC, January 1, 1970.
If tloc is non-zero, the return value is also stored in the location to which tloc points. If tloc points to an illegal address, time()
fails and its actions are undefined.
RETURN VALUES
Upon successful completion, time() returns the value of time. Otherwise, (time_t)-1 is returned and errno is set to indicate the error.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO stime(2), ctime(3C), attributes(5), standards(5)SunOS 5.10 28 Dec 1996 time(2)
Check Out this Related Man Page
time(2) System Calls time(2)NAME
time - get time
SYNOPSIS
#include <sys/types.h>
#include <time.h>
time_t time(time_t *tloc);
DESCRIPTION
The time() function returns the value of time in seconds since 00:00:00 UTC, January 1, 1970.
If tloc is non-zero, the return value is also stored in the location to which tloc points. If tloc points to an illegal address, time()
fails and its actions are undefined.
RETURN VALUES
Upon successful completion, time() returns the value of time. Otherwise, (time_t)-1 is returned and errno is set to indicate the error.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |Async-Signal-Safe |
+-----------------------------+-----------------------------+
SEE ALSO stime(2), ctime(3C), attributes(5), standards(5)SunOS 5.11 28 Dec 1996 time(2)
I am using Korn Shell to process one file at a time. In a recieve directory i have mutiple file but would like to only copy one file at a time. Here i wrote a following code but i am getting find: can not stat error on following line. File exit in the directory. Currently i have 777 privelage to... (1 Reply)
I thought that access time of a file is time when the file was run last time (or I read somewhere that it's time when system lookup the file -> but I'm not sure when it really is)
How is it exactly?
Thank you for help! (11 Replies)
hello everybody!
i want to post a question. So, I use the command 'time a.out' to time the duration of the program a.out. The return value of this function was:
real 0m4.116s
user 0m4.112s
sys 0m0.016s
What i want is! I try to find a way to get (NOT manually) the value of real time.... (2 Replies)
I've a problem with time functions in C. I get current time and convert it to local time and gmt time. But their value seems to be same.I think I'm missing something..
#include <stdio.h>
#include <memory.h>
#include <time.h>
int main()
{
time_t now_local, now_gmt;
... (2 Replies)
I have time in a file in HH:MM:SS format as it contents(its not the file creation time). i need this to be converted to epoch time or time since 1970. The time is written into that file by a script, which i cannot modify. Im using AIX machine
$ cat abc.txt
10:29:34 (2 Replies)