BOOK-IQ4TD9B9LB\DIT-930
2023-05-15 f5120e92b525474f6b4e50130797946986c28eed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System.Diagnostics;
 
namespace SA_LTT
{
    public class SequenceTimer
    {
        #region Property
        public double Seconds
        {
            get
            {
                return _stopwatch.Elapsed.TotalSeconds;
            }
        }
 
        public double Minute
        {
            get
            {
                return _stopwatch.Elapsed.TotalMinutes;
            }
        }
        #endregion
 
        #region Field
        private Stopwatch _stopwatch;
        #endregion
 
        #region Construct
        public SequenceTimer()
        {
            _stopwatch = new Stopwatch();
        }
        #endregion
 
        #region Fuction
        public void Start()
        {
            if (_stopwatch.IsRunning == false)
            {
                _stopwatch.Start();
            }
        }
 
        public void ReStart()
        {
            _stopwatch.Restart();
        }
 
        public void Stop()
        {
            if (_stopwatch.IsRunning == true)
            {
                _stopwatch.Stop();
            }
        }
 
        public void Reset()
        {
            _stopwatch.Reset();
        }
        #endregion
    }
}