# WM_GetNextTgid

## C Specification

      #include <nitro/wm.h>

      u16 WM_GetNextTgid( void );

## Arguments

None.

## Return Values

The first time it is called, it returns a TGID value based on the RTC. After that, it returns the previous return value incremented by 1.

## Description

Returns a TGID value that is automatically generated according to the following rules:

- The first call: Obtains the current RTC time and generates a value based on the formula (minutes * 256 + seconds). (Internally, it calls the `RTC_Init` and `RTC_GetTime` functions.)
- Thereafter: Increments the previous return value by 1 (If it exceeds 0xFFFF, it returns 0)

## See Also

`WM_SetParentParameter`

## Revision History

04/11/2005 Initial version.

CONFIDENTIAL