Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
performace meter
SUBMITTED BY:
Guest
DATE:
Oct. 16, 2014, 1:22 p.m.
FORMAT:
C#
SIZE:
808 Bytes
Raw
Download
Tweet
HITS:
1119
Go to comments
Report
using
System
;
namespace
Performace
{
public
class
PerformaceHandler
{
private
DateTime
Begin
{
get
;
set
;
}
private
DateTime
End
{
get
;
set
;
}
private
MonitorStatus
Status
{
get
;
set
;
}
public
void
StartCounting
()
{
Begin
=
DateTime
.
Now
;
Status
=
MonitorStatus
.
Counting
;
}
public
TimeSpan
StopCounting
()
{
End
=
DateTime
.
Now
;
Status
=
MonitorStatus
.
Stopped
;
return
GetDelta
();
}
private
TimeSpan
GetDelta
()
{
return
End
-
Begin
;
}
}
internal
enum
MonitorStatus
{
Stopped
,
Counting
}
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus