LibreOffice: osl/time.h File Reference

LibreOffice LibreOffice 26.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
time.h File Reference
`#include "sal/config.h"`
`#include "sal/saldllapi.h"`
`#include "sal/types.h"`

Go to the source code of this file.

## Classes
struct | TimeValue
| Time since Jan-01-1970. More...
struct | _oslDateTime

## Typedefs
typedef struct _oslDateTime | oslDateTime

## Functions
SAL_DLLPUBLIC sal_Bool | osl_getSystemTime (TimeValue *pTimeVal)
| Get the current system time as TimeValue.
SAL_DLLPUBLIC sal_Bool | osl_getDateTimeFromTimeValue (const TimeValue *pTimeVal, oslDateTime *pDateTime)
| Get the GMT from a TimeValue and fill a struct oslDateTime.
SAL_DLLPUBLIC sal_Bool | osl_getTimeValueFromDateTime (const oslDateTime *pDateTime, TimeValue *pTimeVal)
| Get the GMT from a oslDateTime and fill a TimeValue.
SAL_DLLPUBLIC sal_Bool | osl_getLocalTimeFromSystemTime (const TimeValue *pSystemTimeVal, TimeValue *pLocalTimeVal)
| Convert GMT to local time.
SAL_DLLPUBLIC sal_Bool | osl_getSystemTimeFromLocalTime (const TimeValue *pLocalTimeVal, TimeValue *pSystemTimeVal)
| Convert local time to GMT.
SAL_DLLPUBLIC sal_uInt32 | osl_getGlobalTimer (void)
| Get the value of the global timer.

## Typedef Documentation

## ◆ oslDateTime

typedef struct _oslDateTime oslDateTime

## Function Documentation

## ◆ osl_getDateTimeFromTimeValue()

SAL_DLLPUBLIC sal_Bool osl_getDateTimeFromTimeValue | ( | const TimeValue * | pTimeVal,
|  | oslDateTime * | pDateTime )

Get the GMT from a TimeValue and fill a struct oslDateTime.

Parameters

  [in] | pTimeVal | TimeValue
  [out] | pDateTime | On success it receives a struct oslDateTime

Returns
  sal_False if any error occurs else sal_True.

## ◆ osl_getGlobalTimer()

SAL_DLLPUBLIC sal_uInt32 osl_getGlobalTimer | ( | void |  | ) |

Get the value of the global timer.

Returns
  current timer value in milliseconds

## ◆ osl_getLocalTimeFromSystemTime()

SAL_DLLPUBLIC sal_Bool osl_getLocalTimeFromSystemTime | ( | const TimeValue * | pSystemTimeVal,
|  | TimeValue * | pLocalTimeVal )

Convert GMT to local time.

Parameters

  [in] | pSystemTimeVal | system time to convert
  [out] | pLocalTimeVal | On success it receives the local time

Returns
  sal_False if any error occurs else sal_True.

## ◆ osl_getSystemTime()

SAL_DLLPUBLIC sal_Bool osl_getSystemTime | ( | TimeValue * | pTimeVal | ) |

Get the current system time as TimeValue.

Return values

  false | if any error occurs.

## ◆ osl_getSystemTimeFromLocalTime()

SAL_DLLPUBLIC sal_Bool osl_getSystemTimeFromLocalTime | ( | const TimeValue * | pLocalTimeVal,
|  | TimeValue * | pSystemTimeVal )

Convert local time to GMT.

Parameters

  [in] | pLocalTimeVal | local time to convert
  [out] | pSystemTimeVal | On success it receives the system time

Returns
  sal_False if any error occurs else sal_True.

## ◆ osl_getTimeValueFromDateTime()

SAL_DLLPUBLIC sal_Bool osl_getTimeValueFromDateTime | ( | const oslDateTime * | pDateTime,
|  | TimeValue * | pTimeVal )

Get the GMT from a oslDateTime and fill a TimeValue.

Parameters

  [in] | pDateTime | oslDateTime
  [out] | pTimeVal | On success it receives a TimeValue

Returns
  sal_False if any error occurs else sal_True.