Questions tagged [stopwatch]

The System.Diagnostics.Stopwatch class in .Net, used to accurately measure elapsed time.

837 questions
-3
votes
3 answers

How to create a timer which starts automatically as soon as a specific webpage is loaded

I want to create a timer which starts automatically as soon as the webpage is loaded and tracks the time I spend on the page before I click on "submit" on that webpage. Is this possible using a tamper monkey script? I want to track time spent on…
-3
votes
1 answer

Corona SDK / simple Stopwatch (milliseconds/seconds/minutes)

right now I am programming a mobile app. I use Corona SDK. I want to make a simple stopwatch. It should count up in milliseconds, seconds and minutes. I googled it already but all examples I found weren't working for me. I know there is a way to…
leon
  • 3
  • 2
-3
votes
3 answers

How to make stopwatch visible? C#

public static string stopwatch() { Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); // Get the elapsed time as a TimeSpan value. TimeSpan ts = stopWatch.Elapsed; // Format and display the TimeSpan…
Mayketi
  • 25
  • 1
  • 6
-3
votes
3 answers

Stopwatch.ElapsedMillisecond Explanation

I need help with how this works. Microsoft's site doesn't have an answer so I was hoping there is a way to deal with this. What would stopwatch.ElapsedMilliseconds % 120000 == 0 mean? It is in an if statement but I need to understand what is meant…
Ahlwong
  • 21
  • 1
-4
votes
1 answer

getting the difference of time

how do you find the difference in time using two methords. and how to call subtract two methords using TimeSpan. static void Main(string[] args) { int baba; var stopWatch = new StopWatch(); Console.WriteLine("Please enter in any value…
-4
votes
3 answers

c# Measure the time between the various functions

I want to measure the time between fucnctions+ get the total time I now that there is Stopwatch but what I know is that I can only get the time between start and stop with Elapsed , so on that way I can get the total time. How can I get the time…
csc3cc3
  • 11
  • 1
-4
votes
1 answer

How to create a stopwatch in c#?

How to create a stopwatch in c# (visual studio 2012)that starts when you start typing in a a text box and stops when enter is pressed? It should start again when i start typing another word and end again on pressing enter, then display the times…
-4
votes
1 answer

Structs cannot contain explicit parameterless constructors

I'd like to define a struct that includes StopWatch and then an array of struct. struct SWExecutionTime { public Stopwatch swExeTime; public int intSWRecCount; public double dblSWResult; } SWExecutionTime[]…
NESHOM
  • 899
  • 16
  • 46
-4
votes
1 answer

Why property "ElapsedTicks" of List not equal to "ElapsedTicks" of Array?

For example I have the following code implements Stopwatch: var list = new List(); var array = new ArrayList(); Stopwatch listStopwatch = new Stopwatch(), arrayStopwatch = new Stopwatch(); listStopwatch.Start(); for (int i =0; i…
Eluvium
  • 163
  • 1
  • 4
  • 17
-5
votes
1 answer

Can someone help me with an err?

So i made a stopwatch command for my discord bot but it says: TypeError: Cannot read property 'id' of undefined on message.guild.id) pls help im trying to find why this happens for a week const Discord = require('discord.js'); const StopWatch =…
-5
votes
1 answer

How many ways are there to measure time?

So far, I've counted three ways to measure the current time or time differences in C#: DateTime.Now Environment.TickCount StopWatch And the following types that represent time/timespan measurements: DateTime TimeSpan Are there any…
Hatchling
  • 191
  • 1
  • 7
-7
votes
2 answers

Less verbose Stopwatch

I recently came across a pair of functions from js-land that I rather like: console.time("CalcPrimes"); // Go calculate primes console.timeEnd("CalcPrimes"); // Outputs something like > CalcPrimes: 2150ms Behind the scenes it's a simple dictionary…
Jeff B
  • 8,572
  • 17
  • 61
  • 140
1 2 3
55
56