source: trunk/ADOL-C/examples/additional_examples/clock/myclock.cpp @ 42

Last change on this file since 42 was 42, checked in by awalther, 10 years ago

set svn keywords property

  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1/*----------------------------------------------------------------------------
2 ADOL-C -- Automatic Differentiation by Overloading in C++
3 File:     myclock.cpp
4 Revision: $Id: myclock.cpp 42 2009-07-15 18:37:17Z awalther $
5 Contents: timing utilities
6
7 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz,
8               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel
9 
10 This file is part of ADOL-C. This software is provided as open source.
11 Any use, reproduction, or distribution of the software constitutes
12 recipient's acceptance of the terms of the accompanying license file.
13 
14---------------------------------------------------------------------------*/
15 
16/****************************************************************************/
17/*                                                                 INCLUDES */
18#include <sys/timeb.h>
19#include <time.h>
20#include <../examples/additional_examples/clock/myclock.h>
21
22
23
24/****************************************************************************/
25/*                                                          CLOCK UTILITIES */
26
27double myclock( int normalize ) {
28    struct timeb tb;
29
30    ftime(&tb);
31    return ((double)tb.time+(double)tb.millitm/1000.);
32}
33
34void normalize() {}
35
Note: See TracBrowser for help on using the repository browser.