Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / time / difftime.c
blob52ab9d84ff63af6a60845a0ed46f091fe96ca4c7
1 /*
2 * difftime.c
3 * Original Author: G. Haley
4 */
6 /*
7 FUNCTION
8 <<difftime>>---subtract two times
10 INDEX
11 difftime
13 SYNOPSIS
14 #include <time.h>
15 double difftime(time_t <[tim1]>, time_t <[tim2]>);
17 DESCRIPTION
18 Subtracts the two times in the arguments: `<<<[tim1]> - <[tim2]>>>'.
20 RETURNS
21 The difference (in seconds) between <[tim2]> and <[tim1]>, as a <<double>>.
23 PORTABILITY
24 ANSI C requires <<difftime>>, and defines its result to be in seconds
25 in all implementations.
27 <<difftime>> requires no supporting OS subroutines.
30 #include <time.h>
32 double
33 difftime (time_t tim1,
34 time_t tim2)
36 return (double)(tim1 - tim2);