Clicky

Fortran Wiki
system_clock (changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #3 to #4: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Description

(削除) SYSTEM_CLOCK(f95) (削除ここまで)(追記) system_clock (追記ここまで) lets you measure durations of time with the precision of the smallest time increment generally available on a system by returning processor-dependent values based on the current value of the processor clock. The clock value is incremented by one for each clock count until the value count_max is reached and is then reset to zero at the next count. clock therefore is a modulo value that lies in the range 0 to count_max. count_rate and count_max are assumed constant (even though CPU rates can vary on a single platform).(削除) count_rate (削除ここまで)(削除) reports the number of clock ticks per second, allowing (削除ここまで)(削除) clock (削除ここまで)(削除) values to be translated from clock clicks to seconds. (削除ここまで)

(削除) If there is no clock, (削除ここまで)(削除) count (削除ここまで)(削除) is set to (削除ここまで)(削除) -huge(count) (削除ここまで)(削除) , and (削除ここまで)count_rate (追記) is (追記ここまで)(追記) system (追記ここまで)(追記) dependent (追記ここまで) and(追記) can (追記ここまで)(追記) vary (追記ここまで)(追記) depending (追記ここまで)(追記) on (追記ここまで)(追記) the (追記ここまで)(追記) kind (追記ここまで)(追記) of (追記ここまで)(追記) the (追記ここまで)(追記) arguments. (追記ここまで)(削除) count_max (削除ここまで)(削除) are set to zero. (削除ここまで)

(削除) SYSTEM_CLOCK(f95) (削除ここまで)(追記) If there is no clock, or querying the clock fails, (追記ここまで)(削除) is typically used to measure short time intervals (system clocks may be 24-hour clocks or measure processor clock ticks since boot, for example). It is most often used for measuring or tracking the time spent in code blocks in lieu of using profiling tools. (削除ここまで)(追記) count (追記ここまで)(追記) is set to (追記ここまで)(追記) -huge(count) (追記ここまで)(追記) , and (追記ここまで)(追記) count_rate (追記ここまで)(追記) and (追記ここまで)(追記) count_max (追記ここまで)(追記) are set to zero. (追記ここまで)

(追記)

system_clock is typically used to measure short time intervals (system clocks may be 24-hour clocks or measure processor clock ticks since boot, for example). It is most often used for measuring or tracking the time spent in code blocks in lieu of using profiling tools.

(追記ここまで)
(追記) (追記ここまで)

Standard

Fortran 95 and later

Class

Subroutine

Syntax

(削除)

call system_clock([count, count_rate, count_max])

(削除ここまで)
(追記)
call system_clock([count, count_rate, count_max])
(追記ここまで)

Arguments

  • count - (Optional) shall be a scalar of type integer with intent(out).
  • count_rate - (Optional) shall be a scalar of type integer or real with intent(out).
  • count_max - (Optional) shall be a scalar of type integer with intent(out).

Example

program test_system_clock
 integer :: count, count_rate, count_max
 call system_clock(count, count_rate, count_max)
 write(*,*) count, count_rate, count_max
end program

See also

date_and_time, cpu_time

category: intrinsics

Revised on April 4, 2016 17:35:50 by Jason Blevins (128.146.137.52) (1924 characters / 0.0 pages)
Edit | Back in time (3 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Intrinsic procedures, cpu_time, date_and_time

AltStyle によって変換されたページ (->オリジナル) /