mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
(#ifndef CLK_TCK): Define it using sysconf() if not already defined.
(CLK_TCK wasn't defined on Solbourne S4000 running OS/MP 4.1B. Reported by Pekka Yrjola <py@fipnet.fi>.) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@262 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f38e31db70
commit
f97aabf611
1 changed files with 3 additions and 0 deletions
|
@ -106,6 +106,9 @@ id monthNames;
|
|||
times(&end_tms);
|
||||
|
||||
/* CLK_TCK is the number of clock ticks each second */
|
||||
#ifndef CLK_TCK
|
||||
#define CLK_TCK sysconf(3) /* sysconf(_SC_CLK_TCK) */
|
||||
#endif
|
||||
return ((long)((end_tms.tms_utime - start_tms.tms_utime +
|
||||
end_tms.tms_stime - start_tms.tms_stime) * 1000) / CLK_TCK);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue