1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Halofreak1990 1c277b2038 Fixed a couple of errors, removed Dictionary references from the ContentManager to get it to compile.
Now, the only thing keeping XFX from a full compile is my stupid attempt at Asynchronous IO. Will look at that, but most likely, I will comment it out and just get a new Demo out before New Year.
2010-12-27 01:01:25 +00:00

81 lines
2.4 KiB
C++

/********************************************************
* TimeSpan.h *
* *
* XFX TimeSpan definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _SYSTEM_TIMESPAN_
#define _SYSTEM_TIMESPAN_
#include "Types.h"
namespace System
{
class TimeSpan
{
private:
Int64 _ticks;
static bool CalculateTicks(int days, int hours, int minutes, int seconds, int milliseconds, bool throwExc, out long long result);
static TimeSpan Interval(double value, int scale);
public:
static const TimeSpan MaxValue;
static const TimeSpan MinValue;
static const TimeSpan Zero;
static const Int64 TicksPerMillisecond;
static const Int64 TicksPerSecond;
static const Int64 TicksPerMinute;
static const Int64 TicksPerHour;
static const Int64 TicksPerDay;
int Days();
int Hours();
int Milliseconds();
int Minutes();
int Seconds();
Int64 Ticks();
double TotalDays();
double TotalHours();
double TotalMilliseconds();
double TotalMinutes();
double TotalSeconds();
TimeSpan();
TimeSpan(int hours, int minutes, int seconds);
TimeSpan(int days, int hours, int minutes, int seconds);
TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds);
TimeSpan(long long ticks);
TimeSpan(const TimeSpan &obj); // Copy constructor
TimeSpan Add(TimeSpan ts);
int Compare(TimeSpan t1, TimeSpan t2);
int CompareTo(TimeSpan ts);
bool Equals(TimeSpan obj);
bool Equals(TimeSpan t1, TimeSpan t2);
static TimeSpan FromDays(double value);
static TimeSpan FromHours(double value);
static TimeSpan FromMilliseconds(double value);
static TimeSpan FromMinutes(double value);
static TimeSpan FromSeconds(double value);
static TimeSpan FromTicks(Int64 value);
int GetHashCode();
TimeSpan Negate();
TimeSpan Parse(char* s); //! TODO
TimeSpan Subtract(TimeSpan ts);
char* ToString(); //! TODO
TimeSpan operator+(const TimeSpan other);
bool operator==(const TimeSpan other);
bool operator >(const TimeSpan other);
bool operator>=(const TimeSpan other);
bool operator!=(const TimeSpan other);
bool operator <(const TimeSpan other);
bool operator<=(const TimeSpan other);
TimeSpan operator -(const TimeSpan other);
TimeSpan operator -();
};
}
#endif //_TIMESPAN_