Solved

vb.net - stats per x amount of time

Posted on 2013-01-16
1
206 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
SQL Server Connection String through a VPN 8 55
JSON Deserialize issue 6 26
System.net.Sockets Error 5 27
PowerShell:  Column widths won't expand 3 18
Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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