Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Timer.cs « System.Threading « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f134d66612a77fb5a931a5b65f12d2fbdbe15ed9 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//
// System.Threading.Timer.cs
//
// Author:
//   Dick Porter (dick@ximian.com)
//
// (C) Ximian, Inc.  http://www.ximian.com
//


namespace System.Threading
{
	public sealed class Timer : MarshalByRefObject, IDisposable
	{
		[MonoTODO]
		public Timer(TimerCallback callback, object state, int dueTime, int period) {
			if(dueTime < -1) {
				throw new ArgumentOutOfRangeException("Due time < -1");
			}
			if(period < -1) {
				throw new ArgumentOutOfRangeException("Period < -1");
			}
			
			// FIXME
		}

		[MonoTODO]
		public Timer(TimerCallback callback, object state, long dueTime, long period) {
			if(dueTime < -1) {
				throw new ArgumentOutOfRangeException("Due time < -1");
			}
			if(period < -1) {
				throw new ArgumentOutOfRangeException("Period < -1");
			}
			// FIXME
		}

		[MonoTODO]
		public Timer(TimerCallback callback, object state, TimeSpan dueTime, TimeSpan period) {
			if(dueTime.Milliseconds < 0 || dueTime.Milliseconds > Int32.MaxValue) {
				throw new ArgumentOutOfRangeException("Due time out of range");
			}
			if(period.Milliseconds < 0 || period.Milliseconds > Int32.MaxValue) {
				throw new ArgumentOutOfRangeException("Period out of range");
			}
			// FIXME
		}

		[CLSCompliant(false)][MonoTODO]
		public Timer(TimerCallback callback, object state, uint dueTime, uint period) {
			// FIXME
		}

		[MonoTODO]
		public bool Change(int dueTime, int period) {
			if(dueTime < -1) {
				throw new ArgumentOutOfRangeException("Due time < -1");
			}
			if(period < -1) {
				throw new ArgumentOutOfRangeException("Period < -1");
			}
			// FIXME
			return(false);
		}

		[MonoTODO]
		public bool Change(long dueTime, long period) {
			if(dueTime < -1) {
				throw new ArgumentOutOfRangeException("Due time < -1");
			}
			if(period < -1) {
				throw new ArgumentOutOfRangeException("Period < -1");
			}
			if(dueTime > 4294967294) {
				throw new NotSupportedException("Due time too large");
			}
			if(period > 4294967294) {
				throw new NotSupportedException("Period too large");
			}
			// FIXME
			return(false);
		}

		[MonoTODO]
		public bool Change(TimeSpan dueTime, TimeSpan period) {
			// FIXME
			return(false);
		}

		[CLSCompliant(false)][MonoTODO]
		public bool Change(uint dueTime, uint period) {
			// FIXME
			return(false);
		}

		[MonoTODO]
		public void Dispose() {
			// FIXME
		}

		[MonoTODO]
		public bool Dispose(WaitHandle notifyObject) {
			// FIXME
			return(false);
		}

		[MonoTODO]
		~Timer() {
			// FIXME
		}
	}
}