Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
역순 Progress 정순으로 가도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheric0210 committed May 16, 2022
1 parent b28eed7 commit 238f0b6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed class Program
private static readonly ILog IPCLogger = LogManager.GetLogger("IPC");

private static string CurrentPhaseName = "Unknown";
private static int RemainingImageCount;
private static int ProcessedImageCount;
private static int TotalImageCount;

private Program()
Expand All @@ -25,12 +25,13 @@ private Program()
private static void PhaseChange(string phaseName, int totalImageCount)
{
CurrentPhaseName = phaseName;
RemainingImageCount = TotalImageCount = totalImageCount;
ProcessedImageCount = 0;
TotalImageCount = totalImageCount;
}

private static string ImageProcessed()
{
int remaining = Interlocked.Decrement(ref RemainingImageCount);
int remaining = Interlocked.Increment(ref ProcessedImageCount);
string progress = $"{remaining}/{TotalImageCount}";
Console.Title = $"{CurrentPhaseName} phase : Processed {progress} images";
return progress;
Expand Down

0 comments on commit 238f0b6

Please sign in to comment.