mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
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:
32
SabreTools.Library/External/RVIO/Win32Native.cs
vendored
32
SabreTools.Library/External/RVIO/Win32Native.cs
vendored
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user