[Gambas-devel] New Timer Function again
Benoit Minisini
gambas at ...1...
Thu Sep 16 10:51:57 CEST 2004
On Wednesday 15 September 2004 17:55, Roger Hallgren wrote:
> On Tuesday 14 September 2004 20:01, Roger Hallgren wrote:
> > I"d like to see a new Timer fuction added to Gambas that works like VB"s
> > Timer, maybe name it Timer2 ... In VB the Timer returns the time since
> > midnight in milliseconds then resets to zero at midnight and starts
> > over.
> >
> > Thanks for reading this.
> > Roger Hallgren
> >
> >
> >
> >Another lazy man :-)
> >
> >FUNCTION Timer2() AS Float
> >
> > RETURN CFloat(Frac(Now)) * 1000
> >
> >END
> >
> >--
> >Benoit Minisini
>
> You called me lazy :-( .. I thought you wanted ideas for new functions in
> Gambas. I'm old so be nice .. :-)
>
> The above code you replied with seems to just give a error .. (Type
> mismatch: wanted Number, got Date instead)
>
> Thanks again!
> Roger Hallgren
>
Ha! I didn't put the conversion at the right place. So...
RETURN Frac(CFloat(Now)) * 1000
Regards,
--
Benoit Minisini
mailto:gambas at ...1...
More information about the Devel
mailing list