Difference between revisions of "ConvertTime"

From SCAR Divi Manual
Jump to: navigation, search
(Created page with "==Definition== <source lang="scar" lines="false"> procedure ConvertTime(const ms: Integer; var h, m, s: Integer); </source> ==Availability== SCAR Divi 3.00 > Current ==Descript...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
==Definition==
 
==Definition==
 
<source lang="scar" lines="false">
 
<source lang="scar" lines="false">
procedure ConvertTime(const ms: Integer; var h, m, s: Integer);
+
procedure ConvertTime(const MS: Integer; out H, M, S: Integer);
 
</source>
 
</source>
  
Line 8: Line 8:
  
 
==Description==
 
==Description==
Converts a number of milliseconds given in '''ms''' into a number of hours, minutes and seconds returned in '''h''', '''m''' and '''s'''.
+
Converts a number of milliseconds given in '''MS''' into a number of hours, minutes and seconds returned in '''H''', '''M''' and '''S'''.
  
 
==Example==
 
==Example==
Line 24: Line 24:
  
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:GUI Functions]]
 
 
[[Category:Time Functions]]
 
[[Category:Time Functions]]

Latest revision as of 17:38, 1 June 2012

Definition

procedure ConvertTime(const MS: Integer; out H, M, S: Integer);

Availability

SCAR Divi 3.00 > Current

Description

Converts a number of milliseconds given in MS into a number of hours, minutes and seconds returned in H, M and S.

Example

var
  h, m, s: Integer;
begin
  ConvertTime(1000000, h, m, s); 
  WriteLn('1000000ms is ' + IntToStr(h) + 'h, ' + IntToStr(m) + 'm, ' + IntToStr(s) + 's');
end.

Output:

1000000ms is 0h, 16m, 40s