NetResponsibility

class BootHistory

Library: Net Responsibility
Package: Core
Header: BootHistory.h

Description

BootHistory processes the computer's boot history to determine whether or not Net Responsibility have been shut down manually.

Almost all code is taken from the Linux command "last", so credit goes to Miquel van Smoorenburg, miquels@cistron.nl

Member Summary

Member Functions: getBootTime, getHaltTime, getOmittedSessions

Constructors

BootHistory

BootHistory();

Member Functions

getBootTime

int getBootTime();

Get the unix timestamp of when the current session booted.

getHaltTime

int getHaltTime(
    int bootTime
);

Get the unix timestamp of when the session with the given bootTime halted or 0 on failure.

getOmittedSessions

map < int, int > getOmittedSessions(
    set < int > logged
);

Returns all sessions that are not logged for some reason. Only the sessions with a boot time later than the first element of logged.