Author Topic: Re: simple minutes countdown clock  (Read 758 times)

0 Members and 1 Guest are viewing this topic.

Offline OldMoses

  • Seasoned Forum Regular
  • Posts: 469
    • View Profile
Re: simple minutes countdown clock
« on: June 19, 2019, 06:49:37 am »
I won't be burning my cookies anymore. ;)

I need to start working with fonts like this, nice job.


Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: simple minutes countdown clock
« Reply #1 on: June 19, 2019, 10:23:55 am »
That would be very useful for me. Great idea!
« Last Edit: June 19, 2019, 11:54:04 am by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: simple minutes countdown clock
« Reply #2 on: June 19, 2019, 11:53:40 am »
Here is a version I am testing now:
Code: QB64: [Select]
  1. _TITLE "Timer" 'b+ mod 2019-06-19
  2. SCREEN _NEWIMAGE(200, 20, 32)
  3. DIM tstart, m, k$
  4. INPUT "Minutes "; m    'decimal fractions of a minute work too
  5. m = m * 60
  6. tstart = TIMER(.001)
  7. WHILE LEN(k$) = 0     'kill timer at any time
  8.     CLS
  9.     k$ = INKEY$
  10.     PRINT USING "####.##"; (m - (TIMER(.001) - tstart)) / 60;      ' show both pos countdown and - time past
  11.     IF (m - (TIMER(.001) - tstart)) / 60 < 0 THEN BEEP: _DELAY .98  ' beep about once per second
  12.     _LIMIT 60
  13.