# mmGetCurrentTime

Obtains the current time elapsed during a play operation.

#### Prototype

DWORD mmGetCurrentTime ( MMFILE *pMMFile, unsigned int *currTime)

Argument | Description
pMMFile | A pointer to the object that controls the multimedia file.
currTime | Returns the current time, based on the video track time, in milliseconds.

#### Return values

Return value | Description
SUCCESS |
MMERR_NO_SYNC_TABLE | File does not have a sync table.
MMERR_INVALID_FILE | pMMFile is NULL.

#### Details

mmGetCurrentTime obtains the current time elapsed during a play operation. The current time is useful information for seek operations.

For example, to seek ahead 30 seconds from the current time, the application:

1. Gets the current time using mmGetCurrentTime.

2. Adds the seek ahead time (30 seconds) to the current time.

3. Uses mmSeekToTime to seek to the computed time.

#### Example

DWORD ret;
Unsigned int currTime;
ret = mmGetCurrentTime(&mmFile, &currTime);
If( ret != SUCCESS )
{
printf ("\nERROR in mmGetSyncPoints (%d)\n", ret);
return -1;
}