From 9f7dbbd166c343e29046e2f35e849e91a7b50513 Mon Sep 17 00:00:00 2001 From: Enes Okullu Date: Thu, 15 Feb 2024 22:52:45 +0300 Subject: [PATCH] Update README.md Updating README with new example. --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b983aa4..3c6d3b4 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,22 @@ CalculateETA is a project to calculate estimated time to arrive on loops whether ### Description -CalculateETA has methods to calculate estimated time to finish on loops. It calculates left count of iteration and multiply it with avarage passed time on the loop. On multi-thread applications, it has internal counter that increases everytime methods works via using that calculating left count of loop and multiply it with avarage passed time on the loop. +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. +CalculateETA is optimized for CPU-intense applications which methods are named Unsafe as suffix such as CalcUnsafe() and NameETAUnsafe(). ### Example Usage + +``` +public string CalcSTCPUIntense(int? index, int? totalIndex, double? totalElapsedTimeInMs) +{ + return NameETAUnsafe(CalcETAUnsafe(index, totalIndex, totalElapsedTimeInMs)); +} +``` ``` -public string CalcSingleThread(int? index, int? totalIndex, double? totalElapsedTimeInMs) +public string CalcSTBetterVisual(int? index, int? totalIndex, double? totalElapsedTimeInMs) { - return NameETA(CalcETA(index, totalIndex, totalElapsedTimeInMs)); + return NameETABetterVisual(CalcETA(index, totalIndex, totalElapsedTimeInMs)); } ``` ``` @@ -45,4 +52,4 @@ If you'd like to contribute, then contribute. [contributing guide](https://githu [![Contributors](https://contrib.rocks/image?repo=meokullu/CalculateETA)](https://github.com/meokullu/CalculateETA/graphs/contributors) ### Help -Twitter: Enes Okullu [@enesokullu](https://twitter.com/EnesOkullu) \ No newline at end of file +Twitter: Enes Okullu [@enesokullu](https://twitter.com/EnesOkullu)