Beispiel #1
0
        void Check()
        {
            float readSpeed;
            float writeSpeed;

            try
            {
                readSpeed  = m_ReadSpeedCounter.Read();
                writeSpeed = m_WriteSpeedCounter.Read();
            }
            catch (InvalidOperationException e)
            {
                m_Log.Warn(e, $"Could not determine disk usage of {InstanceName}. Maybe you closed the application?. Please restart the application '{InstanceName}'.");
                DiskUsage.OnNext(DiskUsageEventArgs.Zero);
                return;
            }
            DiskUsage.OnNext(new DiskUsageEventArgs(readSpeed, writeSpeed));
        }