diff options
author | Sander Vesik <svesik@openoffice.org> | 2002-09-03 12:13:59 +0000 |
---|---|---|
committer | Sander Vesik <svesik@openoffice.org> | 2002-09-03 12:13:59 +0000 |
commit | af306c3106f40b29e739e27dacfedfbe5ab2340b (patch) | |
tree | 21749d7a73e7c7686e6965d55659b24aa8758f27 /tools/source | |
parent | b5a0bf9025f3a1f17917dc47dffc0aecddb5a9e6 (diff) |
Merge CLK_TCK change from OO642C (and many branches before that) to HEAD
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/datetime/ttime.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/source/datetime/ttime.cxx b/tools/source/datetime/ttime.cxx index 6ea7b62a3646..4f4bf7b341ed 100644 --- a/tools/source/datetime/ttime.cxx +++ b/tools/source/datetime/ttime.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ttime.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: er $ $Date: 2002-04-15 10:58:58 $ + * last change: $Author: svesik $ $Date: 2002-09-03 13:13:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,7 +73,7 @@ #include <dos.h> #elif defined UNX #include <limits.h> -#ifdef IRIX +#if defined( IRIX ) || defined( UNX ) #include <unistd.h> #endif #include <sys/times.h> @@ -502,7 +502,13 @@ ULONG Time::GetSystemTicks() if ( !nImplTicksPerSecond ) { +#if defined( CLK_TCK ) nImplTicksPerSecond = CLK_TCK; +#elif defined( _SC_CLK_TCK ) + nImplTicksPerSecond = sysconf(_SC_CLK_TCK); +#else +#error "I don't know how to get CLK_TCK." +#endif dImplTicksPerSecond = nImplTicksPerSecond; dImplTicksULONGMAX = (double)(ULONG)ULONG_MAX; } |