---
name: "ACE_POSIX_Asynch_Timer"
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_POSIX_Asynch_Timer"
---

# ACE\_POSIX\_Asynch\_Timer(3)

This class is posted to the completion port when a timer expires. When the complete method of this object is called, the handler's handle\_timeout method will be called.

## NAME

ACE\_POSIX\_Asynch\_Timer -  This class is posted to the completion port when a timer expires. When the complete method of this object is called, the handler's handle\_timeout method will be called.

## SYNOPSIS

```
#include <ace/POSIX_Proactor.h>
class ACE_POSIX_Asynch_Timer : public ACE_POSIX_Asynch_Result
{
  public:
    friend class ACE_POSIX_Proactor;
    friend class ACE_POSIX_SIG_Proactor;
  protected:
    ACE_POSIX_Asynch_Timer (
        ACE_Handler &handler,
        const void *act,
        const ACE_Time_Value &tv,
        ACE_HANDLE event = ACE_INVALID_HANDLE,
        int priority = 0,
        int signal_number = ACE_SIGRTMIN
        );
    inline virtual ~ACE_POSIX_Asynch_Timer (void);
    virtual void complete (
        u_long bytes_transferred,
        int success,
        const void *completion_key,
        u_long error = 0
        );
    ACE_Time_Value time_;
};
```

## PUBLIC MEMBERS

```
friend class ACE_POSIX_Proactor;
```

```
friend class ACE_POSIX_SIG_Proactor;
```

The factory method for this class is with the POSIX\_Proactor  class.

## PROTECTED MEMBERS

```
ACE_POSIX_Asynch_Timer (
    ACE_Handler &handler,
    const void *act,
    const ACE_Time_Value &tv,
    ACE_HANDLE event = ACE_INVALID_HANDLE,
    int priority = 0,
    int signal_number = ACE_SIGRTMIN
    );
```

Constructor.

```
inline virtual ~ACE_POSIX_Asynch_Timer (void);
```

Destructor.

```
virtual void complete (
    u_long bytes_transferred,
    int success,
    const void *completion_key,
    u_long error = 0
    );
```

This method calls the handler's handle\_timeout method.

```
ACE_Time_Value time_;
```

Time value requested by caller

## AUTHOR

Irfan Pyarali irfan@cs.wustl.edu, Tim Harrison harrison@cs.wustl.edu and Alexander Babu Arulanthu alex@cs.wustl.edu

## LIBRARY

ace
