# OS_GetVBlankCount

## Syntax

  `#include <nitro/os.h>`
  `u32 OS_GetVBlankCount( void );`

## Arguments

None.

## Return Values

Returns the V-blank counter value.

## Description

Obtains the value of the V-Blank counter.

The V-blank counter is incremented with V-blank timing. It is cleared to 0 when the IRQ table is initialized. Once initialized, the counter is incremented whenever a V-blank interrupt occurs. The counter is u32 type; in calculations that use 60 frames per second, it takes about two years for the counter to roll over.

The counter is incremented when the ARM7 bus tries to call the V-blank interrupt handler, and writes to the shared main memory area. Therefore, when V-blank is not included in the IRQ interrupt trigger on the ARM7, or when IME is disabled, the counter does not change unless the part that calls the V-blank interrupt handler is reached. If a V-blank interrupt is permitted on ARM7, the counter is incremented even if the V-blank interrupt handler is not set.

## See Also

None.

## Revision History

2005/03/08 Standardized the Japanese term for "interrupt."
2004/08/10 Initial version.

CONFIDENTIAL