PRAgMaTIc
master
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
ticker.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2010 Imperial College London and others.
3
*
4
* Please see the AUTHORS file in the main source directory for a full list
5
* of copyright holders.
6
*
7
* Gerard Gorman
8
* Applied Modelling and Computation Group
9
* Department of Earth Science and Engineering
10
* Imperial College London
11
*
12
* amcgsoftware@imperial.ac.uk
13
*
14
* This library is free software; you can redistribute it and/or
15
* modify it under the terms of the GNU Lesser General Public
16
* License as published by the Free Software Foundation,
17
* version 2.1 of the License.
18
*
19
* This library is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
* Lesser General Public License for more details.
23
*
24
* You should have received a copy of the GNU Lesser General Public
25
* License along with this library; if not, write to the Free Software
26
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27
* USA
28
*/
29
30
#include <sys/time.h>
31
#include <stdio.h>
32
#include <unistd.h>
33
34
double
get_wtime
(){
35
struct
timeval tic;
36
37
long
seconds, useconds;
38
39
gettimeofday(&tic, NULL);
40
41
seconds = tic.tv_sec;
42
useconds = tic.tv_usec;
43
44
return
seconds + useconds*1e-06;
45
}
46
47
get_wtime
double get_wtime()
Definition:
ticker.cpp:34
Generated on Mon Feb 23 2015 22:50:44 for PRAgMaTIc by
1.8.7