Solved

vb.net - stats per x amount of time

Posted on 2013-01-16
1
207 Views
Last Modified: 2013-01-22
hello there,
I have a little app that I made that downloads images from the web.. I would like to know how can I add two stats.. one that tells me how many downloaded per minute and one that tells me every hr.. how can I do this exactly?
0
Comment
Question by:XK8ER
1 Comment
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 38786387
create 4 counters initialized to zero

save the  the start time to 2 variables (one will be static the other one will be changed every minute)
do {
after each download increment the downloaded1 counter
check if a minute has passed by comparing current time with the start time
if current_ time is >= start time + 1 minute
{
// this is the per minute counter
display downloaded1 counter (this is the per minute)
display download1 counter * 60 (downloads/hour)
//
   totaldownloads = totaldownloads + downloaded1 counter
   set downloaded1 counter to 0
   set starttime = currenttime
} while (filestodownload.count > 0)
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP.NET MVC -Update model when click on <li> element 29 68
Regarding swagger API 1 37
How to force output to ascii 2 40
VB.net VSTO Excel Ribbon error 4 14
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question