FAQ Database Discussion Community


inconsistent timing from .net StopWatch

c#,.net,timing,stopwatch,cudafy.net
I have a C# & .NET application that uses a GPU (NVIDA GTX980) to do image processing. There are 4 stages and I synch the CPU to the GPU (no overlap in time) to do timing. But the numbers do not add up. Launch() will do a async launch of...

Stopwatch in JavaScript

javascript,html,stopwatch
Before marking the question duplicate, I want to tell that I have been through all the stopwatch and JavaScript searches but as I am new to the JavaScript, so I can not come to the possible solution myself and I need the help from you guys. What I want to...

WPF ListBox.ItemsSource = ObservableCollection - takes a long time to load

c#,wpf,listbox,datatemplate,stopwatch
I've got code like this: (loading Collection of custom objects into memory and into ListBox item) public class Product : INotifyPropertyChanged { // these four doesn't matter, just Product's simple data public string nDB_No { get; set; } public string fdGrp_Cd { get; set; } public string long_Desc { get;...

Backgroundworker to stop work after specified time

c#,multithreading,timer,backgroundworker,stopwatch
I have went over dozens of question and tutorial but ended up with nothing so I hope to get help of you guys. I have a BW, doing some heavy work (rading up services, saving them into a file). BW is initialized at run time, and fired up with button...

stopwatch time per user in c# asp.net mvc application

c#,asp.net,stopwatch
I have a set of users in my asp.net mvc application. When any user start stopwatch then i need stopwatch to continue even after user logout. And run it until he does not login again and click stop. i can start it on start button click stopWatch = new Stopwatch();...

Matlab GUI stopwatch

matlab,timer,stopwatch
I am a matlab beginner and struggle with programming my first stopwatch GUI. I want to create 6 different buttons, each containing an independent stopwatch. The idea is that if I press one button, a timer starts that measures how long this button (toogle button) is on and saves this...

Cannot resolve symbol issues in making a stopwatch

android,stopwatch,chronometer
(Keep in mind i'm very new to coding) I'm having an issue when coding a stopwatch app, I've scavenged this site and found no solution to my issue, comparing my code to another user's who attempted the same tutorial, i found that they are the same, yet I am getting...

Why property “ElapsedTicks” of List not equal to “ElapsedTicks” of Array?

c#,.net,stopwatch
For example I have the following code implements Stopwatch: var list = new List<int>(); var array = new ArrayList(); Stopwatch listStopwatch = new Stopwatch(), arrayStopwatch = new Stopwatch(); listStopwatch.Start(); for (int i =0; i <=10000;i++) { list.Add(10); } listStopwatch.Stop(); arrayStopwatch.Start(); for (int i = 0; i <= 10000; i++) {...

Not sure how to reset my paused stopwatch

android,reset,stopwatch
(I'm fairly new to coding) Well, I've come across a solution to my previous posts and figured out how to display milliseconds... However, i cant seem to get the paused instance to reset back to 00:00:00 I've tried a few ways such as mreset elapsedTime and setting the base as...

Using signalR with a javascript timer in an MVC 5 web application Memory consumption / how to

javascript,asp.net-mvc,timer,signalr,stopwatch
I'm using maček's answer from this post How to create a stopwatch using JavaScript? to create javascript timers in an HTML table for each tr. When someone starts the timer I would like it to be available for everyone else looking at that same tr element that may be on...

How to measure invocation time of “Handle” method in NServiceBus?

c#,castle-windsor,nservicebus,stopwatch,nservicebus5
I need to measure invocation time of Handle method in every instance of IHandleMessages<> interface. I tried to use Interceptor of Castle Windsor, public class NsbHandlerMeasurementInterceptor : IInterceptor { public void Intercept(IInvocation invocation) { if (invocation.Method.Name == ExpressionExtender.GetMethodName<IHandleMessages<DummyType>>(b => b.Handle(null))) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); invocation.Proceed(); stopwatch.Stop(); //...