QR_MUMPS
 All Classes Files Functions Variables Enumerations Enumerator Pages
secs.c
Go to the documentation of this file.
1 /* ##############################################################################################
2 **
3 ** Copyright 2012 CNRS, INPT
4 **
5 ** This file is part of qr_mumps.
6 **
7 ** qr_mumps is free software: you can redistribute it and/or modify
8 ** it under the terms of the GNU Lesser General Public License as
9 ** published by the Free Software Foundation, either version 3 of
10 ** the License, or (at your option) any later version.
11 **
12 ** qr_mumps is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ** GNU Lesser General Public License for more details.
16 **
17 ** You can find a copy of the GNU Lesser General Public License
18 ** in the qr_mumps/doc directory.
19 **
20 ** ##############################################################################################*/
21 
22 
23 !!##############################################################################################
24 !> @file secs.c
25 !! FIXME: add comments
26 !!
27 !! @date 05-04-2011
28 !! @author Alfredo Buttari
29 !! @version 0.0.1
30 !!
31 !!##############################################################################################
32 
33 
34 #include <sys/time.h>
35 
36 void secs_(double *s)
37 {
38  struct timeval tp;
39  struct timezone tzp;
40  int i;
41 
42  i = gettimeofday(&tp,&tzp);
43  *s = ( (double) tp.tv_sec + (double) tp.tv_usec * 1.e-6 );
44 
45  return;
46 }
47 
48 
49 void usecs_(double *s){
50  struct timeval t;
51  struct timezone tzp;
52 
53  gettimeofday(&t,&tzp);
54  *s = (double) t.tv_sec*1000000+t.tv_usec;
55 
56  return;
57 
58 }
void usecs_(double *s)
Definition: secs.c:49
* s
Definition: secs.c:43
int i
Definition: secs.c:40
struct timezone tzp
Definition: secs.c:39