[longomatch] Add new operator * for Time
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add new operator * for Time
- Date: Mon, 6 Feb 2012 02:13:30 +0000 (UTC)
commit 17b9c2b338d28f3d02a7eaff5f2844347253c46f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Mon Feb 6 03:03:14 2012 +0100
Add new operator * for Time
LongoMatch.Core/Store/Time.cs | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Core/Store/Time.cs b/LongoMatch.Core/Store/Time.cs
index 0dfa21f..3127453 100644
--- a/LongoMatch.Core/Store/Time.cs
+++ b/LongoMatch.Core/Store/Time.cs
@@ -156,6 +156,10 @@ namespace LongoMatch.Store
public static Time operator -(Time t1,int t2) {
return new Time {MSeconds = t1.MSeconds-t2};
}
+
+ public static Time operator *(Time t1, double t2) {
+ return new Time {MSeconds = (int) (t1.MSeconds * t2)};
+ }
#endregion
}
}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]