diff options
author | David Edelsohn <dje.gcc@gmail.com> | 1997-04-17 22:26:31 +0000 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 1997-04-17 22:26:31 +0000 |
commit | 63ddb6bd72bc7bb7c541bcb7be876b91467c70f3 (patch) | |
tree | 72ade9000d14876a7ca44e41ee81ed1da09952d0 /sim/common/sim-basics.h | |
parent | b57d4d17d64d0402e2b8faa74ae70d540e5e0b9c (diff) | |
download | gdb-63ddb6bd72bc7bb7c541bcb7be876b91467c70f3.zip gdb-63ddb6bd72bc7bb7c541bcb7be876b91467c70f3.tar.gz gdb-63ddb6bd72bc7bb7c541bcb7be876b91467c70f3.tar.bz2 |
* aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h.
Check for functions getrusage, time.
* sim-basics.h (SIM_ELAPSED_TIME): New typedef.
(sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes.
* sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able.
(sim_elapsed_time_get, sim_elapsed_time_since): New functions.
Diffstat (limited to 'sim/common/sim-basics.h')
-rw-r--r-- | sim/common/sim-basics.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h index f3db0e0..00f83a1 100644 --- a/sim/common/sim-basics.h +++ b/sim/common/sim-basics.h @@ -65,6 +65,14 @@ void *zalloc (unsigned long size); void zfree(void*); +/* Utilities for elapsed time reporting. */ +/* Opaque type, known only inside sim_elapsed_time_foo fns. */ +typedef unsigned long SIM_ELAPSED_TIME; +/* Get reference point for future call to sim_time_elapsed. */ +SIM_ELAPSED_TIME sim_elapsed_time_get (void); +/* Elapsed time in milliseconds since START. */ +unsigned long sim_elapsed_time_since (SIM_ELAPSED_TIME start); + /* Global types that code manipulates */ |