#ifndef UTILS_H
#define UTILS_H

// C Standard Library headers.
#include <assert.h> // Diagnostics.
#include <ctype.h> // Character Class Tests.
#include <errno.h> // Error Codes Reported by (Some) Library Functions.
#include <float.h> // Implementation-defined Floating-Point Limits.
#include <limits.h> // Implementation-defined Limits.
#include <locale.h> // Locale-specific Information.
#include <math.h> // Mathematical Functions.
#include <setjmp.h> // Non-local Jumps.
#include <signal.h> // Signals.
#include <stdarg.h> // Variable Argument Lists.
#include <stddef.h> // Definitions of General Use.
#include <stdio.h> // Input and Output.
#include <stdlib.h> // Utility functions.
#include <string.h> // String functions.
#include <time.h> // Time and Date functions.

// Main windows header.
#include <windows.h>

struct CHRONO
{
	LARGE_INTEGER Start;
	LARGE_INTEGER Finish;
	LARGE_INTEGER Duration;
	LARGE_INTEGER Frequency;
	BOOL Suspended; // Used to know if the chronometer is currently suspended.
};
typedef struct CHRONO CHRONO;

int StartChrono(CHRONO* pChrono);
int SuspendChrono(CHRONO* pChrono, double* pDuration);
double SuspendChronoQuick(CHRONO* pChrono);
int ResumeChrono(CHRONO* pChrono);
int GetTimeElapsedChrono(CHRONO* pChrono, double* pDuration);
double GetTimeElapsedChronoQuick(CHRONO* pChrono);
int StopChrono(CHRONO* pChrono, double* pDuration);
double StopChronoQuick(CHRONO* pChrono);

void mSleep(long Milliseconds);

void DecSec2DaysHoursMinSec(double decsec, int* pDays, int* pHours, int* pMin, int* pSec, double* pDeccsec);

char* strtime_fns(void)	;

#endif // UTILS_H
