forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Timing problem

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Thu Jul 13, 2006 4:31 pm    Post subject: Timing problem Reply with quote

Hello everybody,

I am puzzled with the following.
Trying to get an accurate estimation of time consumption of a certain algorithm, I was using two possible measurements: DATE_AND_TIME and SYSTEM_CLOCK.

Consider the following piece of code:

CALL DATE_AND_TIME (start_date,start_time,zone,values)
CALL SYSTEM_CLOCK (count_start,count_rate,count_max)
millisecs_start = CALC_MILLISECS (values) ! user-defined function

<STUFF TO DO>

CALL DATE_AND_TIME (stop_date,stop_time,zone,values)
CALL SYSTEM_CLOCK (count_stop,count_rate,count_max)
millisecs_stop = CALC_MILLISECS (values) ! user-defined function
WRITE(6,*) millisecs_stop-millisecs_start, count_start-count_stop ! count seems to be decreasing, but hey, no problem.

The results produced were:
elapsed millisecs = 44312
elapsed clock tics = 829019

The funny thing is that COUNT_RATE = 10000, and this is not in accordance with the above results (which rather indicate a CLOCK_RATE of about 18700...)
Any explanation, anybody?

Many thanks!
Lucas.
Back to top
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Fri Jul 14, 2006 2:04 am    Post subject: Timing problem Reply with quote

Lucas

A question like yours about SYSTEM_CLOCK has already been raised on a different forum thread and is still outstanding. In the mean time...

COUNT_RATE is an internal fixed scaling factor that is used when calculating the results.
I cannot think of a way that it might be used at programming level.

The arguments of SYSTEM_CLOCK should be of the same INTEGER KIND and there may well be cases when KIND=4 (INTEGER*Cool is required.

The /TIMING compiler option may be of interest and relevance. See the help file for further details.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group