Pchp.Library.DateTimeFunctions.GetSwatchBeat C# (CSharp) Method

GetSwatchBeat() static private method

static private GetSwatchBeat ( System.DateTime utc ) : int
utc System.DateTime
return int
        static int GetSwatchBeat(System_DateTime utc)
        {
            int seconds = DateTimeUtils.UtcToUnixTimeStamp(utc);
            int beat = (int)(((seconds - (seconds - ((seconds % 86400) + 3600))) * 10) / 864) % 1000;
            return (beat < 0) ? beat + 1000 : beat;
        }