---
name: "ACE_Countdown_Time"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Countdown_Time"
---

# ACE\_Countdown\_Time(3)

Keeps track of the amount of elapsed time.

## NAME

ACE\_Countdown\_Time -  Keeps track of the amount of elapsed time.

## SYNOPSIS

```
#include <ace/OS.h>
class ACE_Countdown_Time
{
  public:
    ACE_Countdown_Time (ACE_Time_Value *max_wait_time);
    ~ACE_Countdown_Time (void);
    int start (void);
    int stop (void);
    int update (void);
    private: ACE_Time_Value *max_wait_time_;
    ACE_Time_Value start_time_;
    int stopped_;
};
```

## DESCRIPTION

This class has a side-effect on the max\_wait\_time -- every time the stop method is called the max\_wait\_time is updated.

## Initialization and termination methods.

```
ACE_Countdown_Time (ACE_Time_Value *max_wait_time);
```

Cache the max\_wait\_time and call start.

```
~ACE_Countdown_Time (void);
```

Call stop.

```
int start (void);
```

Cache the current time and enter a start state.

```
int stop (void);
```

Subtract the elapsed time from max\_wait\_time\_ and enter a stopped state.

```
int update (void);
```

Calls stop and then start.  max\_wait\_time\_ is modified by the call to stop.

```
private: ACE_Time_Value *max_wait_time_;
```

Maximum time we were willing to wait.

```
ACE_Time_Value start_time_;
```

Beginning of the start time.

```
int stopped_;
```

Keeps track of whether we've already been stopped.

## AUTHOR

Doug Schmidt schmidt@cs.wustl.edu, Jesper S. M\|ller stophph@diku.dk, and a cast of thousands...

## The ACE\_Sched\_Priority type should be used for platform-

independent thread and process priorities, by convention. int should be used for OS-specific priorities.

## typedef for the \_stat data structure

## Giving unique ACE scoped names for some important

RTSignal-Related constants. Becuase sometimes, different platforms use different names for these constants.

## LIBRARY

ace
