Autor Beitrag
mattl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 77

Win Xp Pro
Deplphi 3 Pro,Delphi 2005 PE
BeitragVerfasst: Di 10.07.07 10:27 
Ich lasse mir mit einer Message die bisher gespielte Zeit des aktuellen Winamp Tracks abfragen dabei bekomme ich die Zeit als Zehntausenstel sekunden als Integer zurück...
wie kann ich diesen Wert am einfachsten in ein minuten sekunden format umrechnen (mm:ss)?

mfg
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Di 10.07.07 10:44 
ausblenden Delphi-Quelltext
1:
2:
Min := Trunc(Zeit/36000000);
Sek := Trunc( (Zeit -Minuten*36000000)/10000);

_________________
Markus Kinzler.
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Di 10.07.07 11:22 
Hallo

Nur mal als Anregung:
1 min = 60 Sekunden , 1 Std = 3600 Sekunden.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
//Zeit ist integer 
GesamtSeks := Zeit div 10000;//(Zeit+5000) div 10000;//mit runden
min := GesamtSeks div 60);
sek := (GesamtSeks-min*60);


Gruß Horst
mattl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 77

Win Xp Pro
Deplphi 3 Pro,Delphi 2005 PE
BeitragVerfasst: Di 10.07.07 11:23 
danke