///////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research Singularity
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// File: HalClock.cs
//
// Note:
//
using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using Microsoft.Singularity;
namespace Microsoft.Singularity.Hal
{
public abstract class HalClock
{
///
/// Notification that system has received and processed clock
/// interrupt.
///
[NoHeapAllocation]
public abstract void ClearInterrupt();
/// Get the time elapsed since booting.
/// Ticks of 100ns of uptime.
///
[NoHeapAllocation]
public abstract long GetKernelTicks();
///
/// Notification that processor is resuming from halted state.
/// Provides clock to re-sync if it uses the CPU timestamp counter.
///
[NoHeapAllocation]
public abstract void CpuResumeFromHaltEvent();
/// Get time from Real-Time Clock.
/// The number of 100-nanosecond intervals that
/// have elapsed since 12:00 A.M., January 1, 0001.
///
[NoHeapAllocation]
public abstract long GetRtcTime();
/// Set time of Real-Time Clock.
/// The number of 100-nanosecond intervals
/// that have elapsed since 12:00 A.M., January 1, 0001.
///
public abstract void SetRtcTime(long rtcTicks);
}
}