Author Topic: A one shot timer.  (Read 1183 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9738
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
A one shot timer.
« on: August 08, 2021, 02:02:57 PM »
Recently some of the folks at the PowerBASIC forum were addressing a timer issue that was originally asked as a question. The attached example is a one shot timer that uses a thread and can be set to any millisecond duration. It is normal Windows API code written in PBWIN10 and it should be easy enough to use the example for setting a duration that responds with a normal WM_COMMAND message on completion of the duration.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

stevenxie

  • Member
  • **
  • Posts: 55
Re: A one shot timer.
« Reply #1 on: August 08, 2021, 06:17:36 PM »
Hi,Hutch! you are very good! :thumbsup: :thumbsup:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9738
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: A one shot timer.
« Reply #2 on: August 16, 2021, 03:02:26 PM »
For anyone who is interested in how its done in 64 bit MASM, the example is here.

http://masm32.com/board/index.php?topic=9500.0
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

stevenxie

  • Member
  • **
  • Posts: 55
Re: A one shot timer.
« Reply #3 on: August 16, 2021, 05:47:24 PM »
hi,Hutch! You are very good!