Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

difftime(3c) [opensolaris man page]

difftime(3C)						   Standard C Library Functions 					      difftime(3C)

NAME
difftime - computes the difference between two calendar times SYNOPSIS
#include <time.h> double difftime(time_t time1, time_t time0); DESCRIPTION
The difftime() function computes the difference between two calendar times. RETURN VALUES
The difftime() functions returns the difference (time1-time0) expressed in seconds as a double. USAGE
The difftime() function is provided because there are no general arithmetic properties defined for type time_t. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
ctime(3C), attributes(5), standards(5) SunOS 5.11 24 Jul 2002 difftime(3C)

Check Out this Related Man Page

DIFFTIME(3)                                                  Linux Programmer's Manual                                                 DIFFTIME(3)

NAME
difftime - calculate time difference SYNOPSIS
#include <time.h> double difftime(time_t time1, time_t time0); DESCRIPTION
The difftime() function returns the number of seconds elapsed between time time1 and time time0, represented as a double. Each of the times is specified in calendar time, which means its value is a measurement (in seconds) relative to the Epoch, 1970-01-01 00:00:00 +0000 (UTC). ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7). +-----------+---------------+---------+ |Interface | Attribute | Value | +-----------+---------------+---------+ |difftime() | Thread safety | MT-Safe | +-----------+---------------+---------+ CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD. NOTES
On a POSIX system, time_t is an arithmetic type, and one could just define #define difftime(t1,t0) (double)(t1 - t0) when the possible overflow in the subtraction is not a concern. SEE ALSO
date(1), gettimeofday(2), time(2), ctime(3), gmtime(3), localtime(3) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU 2015-08-08 DIFFTIME(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

difference between == and =

This is probably a stupid question to ask. But could somebody help me clearly distinguish the difference between these two operators in unix '==' and '='? (7 Replies)
Discussion started by: Vikas Sood
7 Replies

2. AIX

knowledge

Dear All Kindly provide me with a difference between hdiskpower and hdisk regards (2 Replies)
Discussion started by: magasem
2 Replies

3. Shell Programming and Scripting

Unix function to calcuate the difference in time

HI , I need to get the timedifference between two values... which funcation will help eg: difference betweem 19:22 and 19:43 should give 21 mins (2 Replies)
Discussion started by: savitha
2 Replies

4. Shell Programming and Scripting

how ./example.sh differs from . /example.sh and ./ example.sh

May i know the difference between the execution of the commands: ./example.sh . /example.sh and ./ example.sh the last and last but one is having space in between that is the difference please suggest me the answer for this...:confused: (4 Replies)
Discussion started by: lokeshpashine
4 Replies

5. Shell Programming and Scripting

whats the difference between $* and $@

Hi, whats the difference between $* and $@ in command line arguments to a shell scripts (3 Replies)
Discussion started by: pbsrinivas
3 Replies

6. IP Networking

difference between firewals and vpns

i am confused with firewalls and vpns(virtual private netwoks) can anyone clarify it and let me know is there any document or book to read bye (2 Replies)
Discussion started by: munderam
2 Replies

7. Shell Programming and Scripting

Time difference

Hi All, I know there has been a lot of things that have been written about date arithmetic, but perhaps I have missed something.. The following script takes the input from a file name fail.txt with the following format: CLASSDB 20060328122808 CPPARMS 20060814222056 Where $1 is a file name... (4 Replies)
Discussion started by: Segwar
4 Replies

8. Shell Programming and Scripting

Find Time difference in Unix

Hi, START_TIME :- "10-NOV-2009 00:00:04" STOP_TIME :- "10-NOV-2009 00:05:47" Please help to find difference between these two. Searched for the same topic but did not find an answer for the same time format :( Regards, Robin (3 Replies)
Discussion started by: robinbannis
3 Replies

9. Solaris

Group Permissions - How to tell the difference

I am a member of a few different user groups. I would like to see what the difference is.... Can anyone tell me how to look at permissions side by side ? We are using : SunOS xxxxxx 5.10 Generic_127111-09 sun4u sparc SUNW,Sun-Fire-V440 Thanks ! (10 Replies)
Discussion started by: popeye
10 Replies

10. Shell Programming and Scripting

Log Analysis with AWK with Time difference

I would like to write a shell script that calculated the time difference bettween the log entries. If the time difference is higher as 200 sec. print the complette lines out. My Problem is, i am unable to jump in the next line and calculate the time difference. Thank you for your Help. ... (5 Replies)
Discussion started by: fabian3010
5 Replies

11. Shell Programming and Scripting

What's the difference between $* and $@ ?

What's the difference between $* and $@? And I read that the $* has security problems, why? (6 Replies)
Discussion started by: Henryyy
6 Replies

12. Shell Programming and Scripting

Time difference command in Sun sorlaris

Hi , I want to find out the time difference. If the system date and time is "Jul 18 05:39:00" EST then it should return "Jul 18 04:39:00". i.e one hour differnce in time. Pls help me out. Other eg's : Jul 18 00:00:00 -> Jul 18 23:00:00 Jul 18 01:00:00 -> Jul 17 00:00:00 (3 Replies)
Discussion started by: arukuku
3 Replies

13. UNIX for Advanced & Expert Users

Need to get the time difference for all the transactions in a day

Hello Experts, I need to evaluate my API performance, so need a script to get the time difference for all the transaction that has gone through my application in a day. The challenge is the multi threaded logs, so I cant just get all the Telephone Numbers and check the entering and existing... (5 Replies)
Discussion started by: samjna
5 Replies

14. UNIX for Advanced & Expert Users

LPAR,DLPAR and WPAR

Can anyone please let know difference between LPAR/DLPAR/WPAR. and its purpose ??? (3 Replies)
Discussion started by: Pavithran
3 Replies

15. UNIX for Dummies Questions & Answers

Putty and winscp - what is the difference?

Want to understand the difference between putty and winscp. thanks in advance (2 Replies)
Discussion started by: swathi123
2 Replies