//# //# Corba Time Server //# $Revision: 1.1 $ //# Copyright 2004 by Eric Y. Theriault //# All Rights Reserved. //# http://www.eyt.ca/CORBA //# using System; namespace ca.eyt.corba { /// /// Implements the time server. /// // public class TimeImpl : System.MarshalByRefObject, TimeTools.Time { public TimeImpl() { } #region Time Members /// /// Acquires the current time. /// /// current time public TimeTools.TimeOfDay getTime() { // Get the date System.DateTime dt = System.DateTime.Now; // Copy over to the structure, and return. TimeTools.TimeOfDay day = new TimeTools.TimeOfDay(); day.hour = (short)dt.Hour; day.minute = (short)dt.Minute; day.second = (short)dt.Second; return day; } #endregion } }