63 lines
1.9 KiB
Plaintext
63 lines
1.9 KiB
Plaintext
///////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Microsoft Research Singularity
|
|
//
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//
|
|
// File: HalDevices.csi
|
|
//
|
|
// Note:
|
|
//
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Runtime.InteropServices;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
using Microsoft.Singularity;
|
|
|
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
|
[assembly: System.Reflection.AssemblyKeyFileAttribute("public.snk")]
|
|
[assembly: System.Reflection.AssemblyDelaySignAttribute(true)]
|
|
|
|
namespace Microsoft.Singularity.Hal
|
|
{
|
|
public class HalClock
|
|
{
|
|
public HalClock();
|
|
|
|
/// <summary>
|
|
/// Notification that system has received and processed clock
|
|
/// interrupt.
|
|
/// </summary>
|
|
[NoHeapAllocation]
|
|
public void ClearInterrupt();
|
|
|
|
/// <summary>Get the time elapsed since booting.
|
|
/// <returns>Ticks of 100ns of uptime. </returns>
|
|
/// </summary>
|
|
[NoHeapAllocation]
|
|
public long GetKernelTicks();
|
|
|
|
/// <summary>
|
|
/// Notification that processor is resuming from halted state.
|
|
/// Provides clock to re-sync if it uses the CPU timestamp counter.
|
|
/// </summary>
|
|
[NoHeapAllocation]
|
|
public void CpuResumeFromHaltEvent();
|
|
|
|
/// <summary>Get time from Real-Time Clock.</summary>
|
|
/// <returns>The number of 100-nanosecond intervals that
|
|
/// have elapsed since 12:00 A.M., January 1, 0001.
|
|
/// </returns>
|
|
[NoHeapAllocation]
|
|
public long GetRtcTime();
|
|
|
|
/// <summary>Set time of Real-Time Clock.</summary>
|
|
/// <param name="rtcTime">The number of 100-nanosecond intervals
|
|
/// that have elapsed since 12:00 A.M., January 1, 0001.
|
|
/// </param>
|
|
public void SetRtcTime(long rtcTicks);
|
|
}
|
|
}
|