CalculateETA is a project to calculate estimated time to arrive on loops whether it is in single-thread or multi-thread applicatons.
CalculateETA has methods to calculate estimated time to finish on the loops. It calculates left count of the iteration and avarage passed time on the loop then multiply left count with avarage passed time. On multi-thread applications, it has internal counter that increases everytime methods are called. With using counter calculating left count of the loop and avarage passed time on the loop then multiply left count with avarage passed time.
CalculateETA is optimized for CPU-intense applications which methods are named Unsafe as suffix such as CalcUnsafe() and NameETAUnsafe().
string CalcSTCPUIntense(int? index, int? totalIndex, double? totalElapsedTimeInMs)
{
return NameETAUnsafe(CalcETAUnsafe(index, totalIndex, totalElapsedTimeInMs));
}
string CalcSTBetterVisual(int? index, int? totalIndex, double? totalElapsedTimeInMs)
{
return NameETABetterVisual(CalcETA(index, totalIndex, totalElapsedTimeInMs));
}
string CalcMultiThread(uint? totalIndex, long? totalElapsedTicks)
{
return NameETA(CalcETAHighDense(totalIndex, totalElapsedTicks));
}
To check listed methods, example of output visit wiki page. CalculateETA Wiki
See Changelog
This repository is licensed under the “MIT” license. See MIT license.
If you’d like to contribute, then contribute. contributing guide.
Twitter: Enes Okullu @enesokullu