[Gambas-user] Time Help

nando nando_f at ...951...
Mon Jun 13 13:13:31 CEST 2005


Looks like you are going to do some minute testing...
your example is slightly modified...
-Fernando


---------- Original Message -----------
From: Michael Murphy <ebtmike at ...626...>
To: gambas-user at lists.sourceforge.net
Sent: Sun, 12 Jun 2005 21:28:41 -0400
Subject: [Gambas-user] Time Help

> I'm trying to modify Jonás Alvarez 's count down program to be a fast
> clock and I'm having trouble changeing the hours. Here's what I got 
> so far:
> 
> ______________
> 
> PRIVATE SUB changetime ()
> 
>  'This sub changes the time that is displayed
> 
>   hours = 12  
>   minutes = Int (Int(secs) / 60)
    if minutes > 59 then
      inc hours
      minutes = minutes - 60
    endif
> 
>   textlabel1.Caption = hours & ":" & minutes & ":" & Format (secs -
> minutes * 60)
> 
> END
> 
> PUBLIC SUB Timer1_Timer()
> 
>     secs = secs + 0.1
>     changetime
> 
> END
> 
> _______________
> 
> Above are the two functions that handle the time change. 'hours' is a
> global variable. When I run the program it displays the 'hours' has
> '12' but I can't figure out how to change the hour when the minute is
> more then 59 and I can't figure out how to set miutes to zero, the
> secs work fine and the minutes do change. I've been working on this
> for hours so any help is appreciated. If you need anymore info let me
> know.
> --
> 
> Mike
> 
> It's called fishING. It's the act of fishing. - Jake SG1
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can 
> you shotput a projector? How fast can you ride your desk chair down 
> the office luge track? If you want to score the big prize, get to 
> know the little guy.  Play to win an NEC 61" plasma display: 
> http://www.necitguy.com/?r _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------





More information about the User mailing list