Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #1944

Re: How to check if 1400 ms have passed?

From Karl Wochele <kw@e﹐s-system.de>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: How to check if 1400 ms have passed?
Date 2011-09-05 08:49 +0200
Message-ID <9cj9ofFa16U1@mid.individual.net> (permalink)
References <1qq76794pr6o8jqfmcepteronclarh2kkd@4ax.com>

Show all headers | View raw


Hi Dick,

you can either use the windows-function GetTickCount() which will work 
for 49.7 days correctly or the VO-function seconds() instead of Secs(). 
Then you will get a float with milliseconds...

Karl

Am 04.09.2011 23:25, schrieb D.J.W. van Kooten:
> In my bBrowser class, Dispatch, I have some code allowing the user to
> autoseek while typing. For that the ideal waiting time until the
> string is reset (e.g.  because someone made a mistake and want to
> start over) is 1400 ms. I used:
>
> nNow:=LONGINT(GetTickCountLow()) IF(nNow-SELF:nLastKeyPressTime>1400)
> 	SELF:cSeek:=""
> ENDIF
>
> But I read (after an error of course) that this gives a numeric
> overflow error when Windows runs longer than 5 days (not very
> elegantly handled I think)....
>
>
> For now I replaced it with:
>
> nNow:=LONGINT(Secs(Time())) 	
> which means the waiting time is either 1 seconds (just too short I
> think) or 2 seconds, too long. But Secs() does not return
> milliseconds.
>
> It's not really a big deal but does anyone know which function is
> actually better suited to measure 1400 ms seconds bypassed without
> giving runtime errors?
>
> Dick
>
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to check if 1400 ms have passed? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-09-04 23:25 +0200
  Re: How to check if 1400 ms have passed? dlzc <dlzc1@cox.net> - 2011-09-04 14:50 -0700
    Re: How to check if 1400 ms have passed? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-09-05 08:51 +0200
      Re: How to check if 1400 ms have passed? dlzc <dlzc1@cox.net> - 2011-09-05 12:05 -0700
        Re: How to check if 1400 ms have passed? "Willie Moore" <williem@wmconsulting.com> - 2011-09-05 15:10 -0500
          Re: How to check if 1400 ms have passed? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-09-06 11:13 +0200
      Re: How to check if 1400 ms have passed? malcolm gray <malcolm.gray@ntlworld.com> - 2011-09-06 11:32 +0100
  Re: How to check if 1400 ms have passed? "Bernhard Mayer" <Idonotexisthere@nowhere.com> - 2011-09-05 07:32 +0200
    Re: How to check if 1400 ms have passed? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-09-05 08:48 +0200
  Re: How to check if 1400 ms have passed? Karl Wochele <kw@e©os-system.de> - 2011-09-05 08:49 +0200
    Re: How to check if 1400 ms have passed? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-09-05 13:16 +0200
      Re: How to check if 1400 ms have passed? Karl Wochele <kw@e©os-system.de> - 2011-09-05 13:42 +0200
        Re: How to check if 1400 ms have passed? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-09-05 15:14 +0200
          Re: How to check if 1400 ms have passed? Karl Wochele <kw@e©os-system.de> - 2011-09-05 15:27 +0200
            Re: How to check if 1400 ms have passed? D.J.W. van Kooten <public@ic2remove.this.com> - 2011-09-06 10:57 +0200
  Re: How to check if 1400 ms have passed? E®!k \\/!$$E® <nospam@nospam.url> - 2011-09-06 09:46 +0200
    Re: How to check if 1400 ms have passed? E®!k \\/!$$E® <nospam@nospam.url> - 2011-09-06 10:18 +0200
      Re: How to check if 1400 ms have passed? Karl Wochele <kw@e©os-system.de> - 2011-09-06 10:25 +0200
        Re: How to check if 1400 ms have passed? E®!k \\/!$$E® <nospam@nospam.url> - 2011-09-06 10:30 +0200
    Re: How to check if 1400 ms have passed? Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2011-09-06 10:29 +0200
      Re: How to check if 1400 ms have passed? E®!k \\/!$$E® <nospam@nospam.url> - 2011-09-06 10:47 +0200
  Re: How to check if 1400 ms have passed? "Dirk (Belgium)" <dirk.dot.herijgers@pbprojects.dot.be> - 2011-09-06 08:15 +0000

csiph-web