|
|
|
|
|
- Error
- Threads and parallel tasks
<Chrono>.Start (Function) In french: <Chrono>.Début Starts a stopwatch to measure the duration of a process (in milliseconds) and resets a running stopwatch. The timing is stopped: If timing is stopped, it can be restarted with <Chrono>.Resume. The value of the stopwatch can be read at any time:
MonChrono1 is Chrono
MonChrono2 is Chrono
MonChrono1.Start()
MonChrono2.Start()
DuréeChronoDébut is Duration = MonChrono1.End()
MaFonction()
DuréeMaFonction is Duration = MonChrono2.End()
Info("Le traitement MaFonction() a duré " + DuréeMaFonction, ...
"Le traitement complet a duré " + DuréeChronoDébut)
Syntax <Stopwatch>: Chrono variable Name of the Chrono variable that corresponds to the stopwatch to use. Remarks Error A WLanguage error occurs ("The stopwatch is not started") if <Chrono>.Start was not called before ChronoValue and <Chrono>.End. Threads and parallel tasks Each thread (and each parallel task) includes its own stopwatches. Two distinct threads (or two distinct parallel tasks) can perform separate timings by using the same stopwatch number. The WLanguage error "The stopwatch is not started" will occur only if <Chrono>.Start is not called in the same thread (or in the same parallel task) as ChronoValue and <Chrono>.End.
Related Examples:
|
Unit examples (WINDEV): The Chrono functions
[ + ] Using the ChronoXXX functions. These functions are used to calculate the time passed between the start (ChronoStart) and the end (ChronoEnd).
|
|
Unit examples (WINDEV): Calculations on durations
[ + ] Calculations on dates and times with the WLanguage functions: - Calculate the duration between two moments (dates and times) - Calculate a sum of durations - Calculate an average of durations
|
|
Unit examples (WINDEV Mobile): The Chrono functions
[ + ] Using the WLanguage "Chrono" functions. These functions are used to calculate the time passed between the start (ChronoStart) and the end (ChronoEnd).
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|