daemon: add creation timestamp to GameModeClient

Record the time a client was created, i.e. registered, in the
GameModeClient struct and add a getter for it.

(Alex Smith: Fixed up function documentation comments)
This commit is contained in:
Christian Kellner
2019-07-14 22:01:15 +02:00
committed by Alex Smith
parent 6f39ecbc9b
commit 52367772c8
2 changed files with 27 additions and 0 deletions

View File

@ -32,6 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#define INVALID_PROCFD -1
@ -69,6 +70,11 @@ pid_t game_mode_client_get_pid(GameModeClient *client);
*/
const char *game_mode_client_get_executable(GameModeClient *client);
/**
* The time that game mode was requested for the client.
*/
u_int64_t game_mode_client_get_timestamp(GameModeClient *client);
/**
* Return the singleton instance
*/