Message: Re: G4Timer Questions Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: G4Timer Questions 

Keywords: G4Timer, G4Timer Stop, G4Timer Start
Forum: Run Management
Re: Question G4Timer Questions (Zach Marshall)
Date: 19 Aug, 2006
From: Zach Marshall <>

Hello Again,

Two new concerns about G4Timer:

1) All the Get...Time() functions have a return line:
return diff/sysconf(_SC_CLK_TCK);

But sysconf as it is defined above is:
00057      if( a == _SC_CLK_TCK ) return 1000;
00058      else return 0;

Perhaps there should be some protection against a divide by zero error here?

2) The system variable being used, _SC_CLK_TCK:
"The number of clock ticks per  second;  the  corresponding macro is CLK_TCK."

But various libraries I have seen note the following about CLOCKS_PER_SEC:
CLK_TCK is equivalent, but considered obsolete.

Perhaps this should be changed?


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Re: G4Timer Questions"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]