• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - CDP Core
  • OSAPIOneShotTimer
  • 4.12.9

OSAPIOneShotTimer Class

The OSAPIOneShotTimer is a high-resolution one-shot timer, based on OSAPIPeriodicTimer. More...

Header: #include <OSAPI/Timer/Timer.h>
Inherits: OSAPIPeriodicTimer
  • List of all members, including inherited members

Public Functions

OSAPIOneShotTimer()
int ResetDelay(int delayInms)
int WaitForEvent()

Reimplemented Public Functions

virtual int Start(int delayInMs) override
  • 5 public functions inherited from OSAPIPeriodicTimer

Detailed Description

The OSAPIOneShotTimer is a high-resolution one-shot timer, based on OSAPIPeriodicTimer.

See also OSAPIPeriodicTimer, CDPTimer, CDPParameterTimer, CDPTimerMs, CDPParameterTimerMs, CDPTimerCounting, CDPRampTimer, and CDPComponent::RunInComponentThread.

Member Function Documentation

OSAPIOneShotTimer::OSAPIOneShotTimer()

Contructs an OSAPIOneShotTimer.

int OSAPIOneShotTimer::ResetDelay(int delayInms)

Resets timer delay.

delayInms: New delay in ms.

[override virtual] int OSAPIOneShotTimer::Start(int delayInMs)

Reimplemented from OSAPIPeriodicTimer::Start().

Starts the timer.

Param int periodInMs: Timer tick event time period in ms.

Returns event handle != 0 on success.

int OSAPIOneShotTimer::WaitForEvent()

Waits for timer tick event or semaphore event set by SetEvent().

Blocks calling thread until timer event or semaphore event occurs.

Returns:

-1if no wait actually occured because the delay was calculated to less or equal to zero
0if timer tick occured
1if event occured

Supposed to return 0 if both event and timer tick occured.

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2024 CDP Technologies. Privacy and cookie policy.

Return to top