Click here to Skip to main content
15,913,610 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help with error checking for Dns.GetHostEntry Pin
Shameel11-Aug-11 4:05
professionalShameel11-Aug-11 4:05 
GeneralRe: Need help with error checking for Dns.GetHostEntry Pin
turbosupramk311-Aug-11 4:52
turbosupramk311-Aug-11 4:52 
GeneralRe: Need help with error checking for Dns.GetHostEntry Pin
BobJanova11-Aug-11 5:39
BobJanova11-Aug-11 5:39 
GeneralRe: Need help with error checking for Dns.GetHostEntry Pin
Shameel11-Aug-11 5:48
professionalShameel11-Aug-11 5:48 
QuestionWhat is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
bbranded10-Aug-11 5:05
bbranded10-Aug-11 5:05 
AnswerRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
Ian Shlasko10-Aug-11 5:15
Ian Shlasko10-Aug-11 5:15 
GeneralRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? [modified] Pin
bbranded10-Aug-11 5:27
bbranded10-Aug-11 5:27 
GeneralRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
Ian Shlasko10-Aug-11 5:43
Ian Shlasko10-Aug-11 5:43 
bbranded wrote:
I still have the problem of accuracy, "left over" bytes when polling occurs.

Not really, with the rolling buffer... You would keep the actual time of each report (You could even pass a DateTime+Integer struct from the worker to eliminate cross-thread delays), so you wouldn't have to make any assumptions... Your buffer would look something like:

11:37:50  1500KB
11:37:52  2000KB
...
11:42:30  58000KB
11:42:33  58500KB


So you would get:
(58500KB - 1500KB) / (11:42:33 - 11:37:50)
= 57000KB / 4:43

And I'm too lazy to calculate that out, but that'll give you a KB/minute for the past ~5 minutes. And of course you can adjust the numbers to get whatever level of precision you want. The timer wouldn't actually be used to do any measurements, but rather to just report the results.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels)

GeneralRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? [modified] Pin
bbranded11-Aug-11 7:17
bbranded11-Aug-11 7:17 
GeneralRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
Shameel10-Aug-11 9:32
professionalShameel10-Aug-11 9:32 
AnswerRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
PIEBALDconsult10-Aug-11 15:34
mvePIEBALDconsult10-Aug-11 15:34 
GeneralRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
bbranded10-Aug-11 15:36
bbranded10-Aug-11 15:36 
GeneralRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
PIEBALDconsult10-Aug-11 17:19
mvePIEBALDconsult10-Aug-11 17:19 
GeneralRe: What is the best method to figure out elapsed time in a BackgroundWorker thread? Pin
bbranded11-Aug-11 1:27
bbranded11-Aug-11 1:27 
QuestionFiltering Problem in Sql Syntax using C#.net Pin
nassimnastaran10-Aug-11 0:17
nassimnastaran10-Aug-11 0:17 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
Shameel10-Aug-11 0:38
professionalShameel10-Aug-11 0:38 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
MicroVirus10-Aug-11 3:30
MicroVirus10-Aug-11 3:30 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
GenJerDan10-Aug-11 3:54
GenJerDan10-Aug-11 3:54 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
BobJanova10-Aug-11 3:58
BobJanova10-Aug-11 3:58 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
GenJerDan10-Aug-11 4:01
GenJerDan10-Aug-11 4:01 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
MicroVirus10-Aug-11 4:05
MicroVirus10-Aug-11 4:05 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
BobJanova10-Aug-11 3:57
BobJanova10-Aug-11 3:57 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
nassimnastaran10-Aug-11 4:23
nassimnastaran10-Aug-11 4:23 
GeneralRe: Filtering Problem in Sql Syntax using C#.net Pin
BobJanova10-Aug-11 8:25
BobJanova10-Aug-11 8:25 
AnswerRe: Filtering Problem in Sql Syntax using C#.net Pin
Ian Shlasko10-Aug-11 4:01
Ian Shlasko10-Aug-11 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.