Internal Fixes, etc. (#20)

* Start removing mixed usages

* Check for directories before opening

* Fix writing

* Kinda fix rebuild

* One more try

* Better internal handling

* Slighty fix a couple more things

* Update RVWorld Compress code to db7d750bba

* Fix build

Co-authored-by: Matt Nadareski <mnadareski@mparticle.com>
This commit is contained in:
Matt Nadareski
2020-04-03 13:19:21 -07:00
committed by GitHub
parent 1de4bc7b18
commit 916d2a3b51
79 changed files with 3377 additions and 2337 deletions

View File

@@ -140,39 +140,39 @@ namespace RVIO
internal static class Convert
{
private const long TicksPerMillisecond = 10000;
private const long TicksPerSecond = TicksPerMillisecond*1000;
private const long TicksPerMinute = TicksPerSecond*60;
private const long TicksPerHour = TicksPerMinute*60;
private const long TicksPerDay = TicksPerHour*24;
private const long TicksPerSecond = TicksPerMillisecond * 1000;
private const long TicksPerMinute = TicksPerSecond * 60;
private const long TicksPerHour = TicksPerMinute * 60;
private const long TicksPerDay = TicksPerHour * 24;
// Number of days in a non-leap year
// Number of days in a non-leap year
private const int DaysPerYear = 365;
// Number of days in 4 years
private const int DaysPer4Years = DaysPerYear*4 + 1;
// Number of days in 4 years
private const int DaysPer4Years = DaysPerYear * 4 + 1;
// Number of days in 100 years
private const int DaysPer100Years = DaysPer4Years*25 - 1;
private const int DaysPer100Years = DaysPer4Years * 25 - 1;
// Number of days in 400 years
private const int DaysPer400Years = DaysPer100Years*4 + 1;
private const int DaysPer400Years = DaysPer100Years * 4 + 1;
// Number of days from 1/1/0001 to 12/31/1600
private const int DaysTo1601 = DaysPer400Years*4;
public const long FileTimeOffset = DaysTo1601*TicksPerDay;
// Number of days from 1/1/0001 to 12/31/1600
private const int DaysTo1601 = DaysPer400Years * 4;
public const long FileTimeOffset = DaysTo1601 * TicksPerDay;
// Number of days from 1/1/0001 to 12/31/9999
private const int DaysTo10000 = DaysPer400Years*25 - 366;
private const int DaysTo10000 = DaysPer400Years * 25 - 366;
private const long MinTicks = 0;
private const long MaxTicks = DaysTo10000*TicksPerDay - 1;
private const long MaxTicks = DaysTo10000 * TicksPerDay - 1;
public static long Length(int high, int low)
{
return ((long) high << 32) | (low & 0xFFFFFFFFL);
return ((long)high << 32) | (low & 0xFFFFFFFFL);
}
public static long Time(uint high, uint low)
{
return ((long) high << 32) | low;
return ((long)high << 32) | low;
}
}
}