~ubuntu-branches/ubuntu/saucy/monodevelop/saucy

« back to all changes in this revision

Viewing changes to contrib/Sharpen/Sharpen/TimeUnit.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2012-05-27 18:08:20 UTC
  • mfrom: (1.8.5) (1.5.8 sid)
  • Revision ID: package-import@ubuntu.com-20120527180820-f1ub6lhg0s50wci1
Tags: 3.0.2+dfsg-3
* [fcecfe7] Fix monodevelop-core-addins.pc.in to point to actual 
  installed location of assemblies.
* [26e1a07] DebSrc 3.0 does not support Quilt's -p parameter, so 
  manually adjust the path in the patch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
namespace Sharpen
2
 
{
3
 
        using System;
4
 
 
5
 
        public enum TimeUnit : long
6
 
        {
7
 
                MILLISECONDS = 1,
8
 
                SECONDS = 1000
9
 
        }
10
 
 
11
 
        internal static class TimeUnitExtensions
12
 
        {
13
 
                public static long Convert (this TimeUnit thisUnit, long duration, TimeUnit targetUnit)
14
 
                {
15
 
                        return ((duration * (long)targetUnit) / (long)thisUnit);
16
 
                }
17
 
        }
18
 
}