Subversion Repositories Kolibri OS

Rev

Rev 4872 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4349 Serge 1
/*
2
 * difftime.c
3
 * Original Author:	G. Haley
4
 */
5
 
6
/*
7
FUNCTION
8
<>---subtract two times
9
 
10
INDEX
11
	difftime
12
 
13
ANSI_SYNOPSIS
14
	#include 
15
	double difftime(time_t <[tim1]>, time_t <[tim2]>);
16
 
17
TRAD_SYNOPSIS
18
	#include 
19
	double difftime(<[tim1]>, <[tim2]>)
20
	time_t <[tim1]>;
21
	time_t <[tim2]>;
22
 
23
DESCRIPTION
24
Subtracts the two times in the arguments: `<<<[tim1]> - <[tim2]>>>'.
25
 
26
RETURNS
27
The difference (in seconds) between <[tim2]> and <[tim1]>, as a <>.
28
 
29
PORTABILITY
30
ANSI C requires <>, and defines its result to be in seconds
31
in all implementations.
32
 
33
<> requires no supporting OS subroutines.
34
*/
35
 
36
#include 
37
 
38
double
39
_DEFUN (difftime, (tim1, tim2),
40
	time_t tim1 _AND
41
	time_t tim2)
42
{
43
  return (double)(tim1 - tim2);
44
}