~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/armci/examples/benchmarks/RandomAccess/timing.c

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if HAVE_CONFIG_H
 
2
#   include "config.h"
 
3
#endif
 
4
 
 
5
/** @file
 
6
 * Copyright (c) 1995 by PDCL Corporation.  All Rights Reserved
 
7
 *
 
8
 * NAME
 
9
 *   timing.c
 
10
 * PURPOSE
 
11
 *   Timing routines for calculating the execution time:
 
12
 *     void start_timer(void);  Set the timer.
 
13
 *     double elapsed_time(void);  Return the timing elapsed since
 
14
 *                                 the timer has been set.
 
15
 * NOTES
 
16
 *   Jialin Ju - Oct 16, 1995 Created.
 
17
 */
 
18
 
 
19
#if HAVE_SYS_TYPES_H
 
20
#   include <sys/types.h>
 
21
#endif
 
22
#if HAVE_SYS_ERRNO_H
 
23
#   include <sys/errno.h>
 
24
#endif
 
25
#if HAVE_SYS_TIME_H
 
26
#   include <sys/time.h>
 
27
#endif
 
28
 
 
29
/* Timing routines that use standard Unix gettingofday() */
 
30
static struct timezone tz;
 
31
static struct timeval start_time, finish_time;
 
32
 
 
33
/* Start measuring a time delay */
 
34
void start_timer(void)
 
35
{
 
36
    gettimeofday( &start_time, &tz);
 
37
}
 
38
 
 
39
/* Retunrn elapsed time in milliseconds */
 
40
double elapsed_time(void)
 
41
{
 
42
    gettimeofday( &finish_time, &tz);
 
43
    return(1000.0*(finish_time.tv_sec - start_time.tv_sec) +
 
44
           (finish_time.tv_usec - start_time.tv_usec)/1000.0 );
 
45
}
 
46
 
 
47
/* Return the stopping time in milliseconds */
 
48
double stop_time(void)
 
49
{
 
50
    gettimeofday( &finish_time, &tz);
 
51
    return(1000.0*finish_time.tv_sec + finish_time.tv_usec/1000.0);
 
52
}
 
53