Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 finally...the countdown timer
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ecookman




PostPosted: Wed Dec 17, 2008 8:26 am   Post subject: finally...the countdown timer

thanks to The_Bean walking me through how to do this here it is


Turing:


var christmas : string := "25 Dec 08 00:00:00"
loop
var totalseconds : int := Time.DateSec (christmas) -Time.DateSec (Time.Date)
var days, hours, mins, secs : int


days := totalseconds div 86400
totalseconds:=totalseconds-days*86400

hours := totalseconds div 3600
totalseconds:=totalseconds-hours*3600

mins := totalseconds div 60
totalseconds:=totalseconds-mins*60

secs := totalseconds

var total :int := days*86400+hours*3600+mins*60+secs
var f1 : int
f1 := Font.New ("Airil:12:bold")
Font.Draw(intstr(days)+":"+intstr(hours)+":"+intstr(mins)+":"+intstr(secs),maxx div 2,maxy div 2 ,f1, 12)
delay (1000)
cls
end loop




thanks for helping me

***********************EDIT******************
this program only works in turing 4.1.0
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: