> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XtfGetSystemUpTime

> XtfGetSystemUpTime

# XtfGetSystemUpTime

Gets the amount of time in milliseconds that the System OS and Game OS have been running.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
HRESULT XtfGetSystemUpTime(
         PWCSTR address,
         UINT64* systemUpTimeSystem,
         UINT64* systemUpTimeTitle
)  
```

<a id="parametersSection" />

### Parameters

*address*\
Type: PWCSTR

\[in] The address of the console.

*systemUpTimeSystem*\
Type: UINT64\*

\[out, optional] The amount of time, in milliseconds, that the System OS has been running. If this value is not required, set this to `nullptr`.

*systemUpTimeTitle*\
Type: UINT64\*

\[out, optional] The amount of time, in milliseconds, that the Game OS has been running. If this value is not required, set this to `nullptr`.

<a id="retvalSection" />

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an HRESULT error code.

<a id="remarksSection" />

## Remarks

This function returns the amount of time that the System OS and Game OS have been running.
For the System OS, this value is the time, in milliseconds, since the console was booted. For the Game OS, this is the time, in milliseconds, since the game was launched. For more information about the System OS and Game OS, see For a complete introduction, see [What is the Microsoft Game Development Kit? (NDA topic)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/intro/introduction).

<a id="requirementsSection" />

## Requirements

**Header:** xtfapi.h

**Library:** XtfApi.lib

**Supported platforms:** Windows (for XBOX console tools)

<a id="seealsoSection" />

## See also

[XTF Transport Errors (NDA topic)](/tools/tools-console/commandlinetools/xtf-transport-errors)\
[Additional Xtf APIs](/reference/tools/xtf/xtfapi/atoc-xtfapi)


## Related topics

- [IXtfConsoleControlClient::GetSystemTime](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/methods/ixtfconsolecontrolclient_getsystemtime.md)
- [IXtfDeployCallback::OnDeployInitialized Method](/reference/tools/xtf/xtfapplication/classes/IXtfDeployCallback/methods/ondeployinitialized-ixtfdeploycallback-xtfapplication-xbox-wi.md)
- [XTFSYSTEMTIME](/reference/tools/xtf/xtfconsolecontrol/structs/xtfsystemtime.md)
- [IXtfConsoleControlClient](/reference/tools/xtf/xtfconsolecontrol/interfaces/IXtfConsoleControlClient/ixtfconsolecontrolclient.md)
- [Set up a time-limited trial](/publishing/game-publishing/how-to/how-to-timedtrial.md)
