File: myclock.cpp

package info (click to toggle)
adolc 2.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,684 kB
  • ctags: 3,333
  • sloc: cpp: 18,988; ansic: 15,599; sh: 11,184; makefile: 483
file content (35 lines) | stat: -rw-r--r-- 1,225 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*----------------------------------------------------------------------------
 ADOL-C -- Automatic Differentiation by Overloading in C++
 File:     myclock.cpp
 Revision: $Id: myclock.cpp 171 2010-10-04 13:57:19Z kulshres $
 Contents: timing utilities

 Copyright (c) Andrea Walther, Andreas Griewank, Andreas Kowarz, 
               Hristo Mitev, Sebastian Schlenkrich, Jean Utke, Olaf Vogel 
  
 This file is part of ADOL-C. This software is provided as open source.
 Any use, reproduction, or distribution of the software constitutes 
 recipient's acceptance of the terms of the accompanying license file.
 
---------------------------------------------------------------------------*/
 
/****************************************************************************/
/*                                                                 INCLUDES */
#include <sys/timeb.h>
#include <time.h>
#include "myclock.h"



/****************************************************************************/
/*                                                          CLOCK UTILITIES */

double myclock( int normalize ) {
    struct timeb tb;

    ftime(&tb);
    return ((double)tb.time+(double)tb.millitm/1000.);
}

void normalize() {}