Skip to content

Commit

Permalink
added labels to always show the elapsed time
Browse files Browse the repository at this point in the history
  • Loading branch information
wowkmw committed Oct 22, 2019
1 parent f66e4ce commit 72fb84d
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 15 deletions.
92 changes: 80 additions & 12 deletions OneSearch/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions OneSearch/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ private void button2_Click(object sender, EventArgs e)
myLucene.CleanUpIndexer();
DateTime b = DateTime.Now;
//double seconds = (b - a).TotalSeconds;
MessageBox.Show("The json file takes " + (jb - ja).TotalSeconds.ToString() + "seconds to be imported\n"
+ "The indexing took " + (b - a).TotalSeconds.ToString() + " seconds");
JsonBS.Text = (jb - ja).TotalSeconds.ToString();
IndexBS.Text = (b - a).TotalSeconds.ToString();
//MessageBox.Show("The json file takes " + (jb - ja).TotalSeconds.ToString() + "seconds to be imported\n"
// + "The indexing took " + (b - a).TotalSeconds.ToString() + " seconds");
MessageBox.Show("Searcher ready, enter keywords to start searching...");
}
}
Expand Down Expand Up @@ -152,7 +154,8 @@ private void searchButton_Click(object sender, EventArgs e)
queryCount++;
int numofresult = resultList.Count;
TotalResultBox.Text = numofresult.ToString();
MessageBox.Show("Searching time is " + seconds.ToString() + " seconds");
SearchBS.Text = seconds.ToString();
//MessageBox.Show("Searching time is " + seconds.ToString() + " seconds");
if (numofresult < 30)
{
for (int i = 0; i < numofresult; i++)
Expand Down

0 comments on commit 72fb84d

Please sign in to comment.