HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Component time.ClockHD by barry
expand copy to clipboardexpand
uses time.DateTime

interface ClockHDLib {
	int init()
	TimeHD getTime(int handle)
	void destroy(int handle)
	}

component provides time.ClockHD(Destructor) requires native ClockHDLib lib
	{
	int handle
	
	ClockHD:ClockHD()
		{
		handle = lib.init()
		
		if (handle == 0) throw new Exception("failed to initialise HD clock")
		}
	
	TimeHD ClockHD:getTime()
		{
		return lib.getTime(handle)
		}
	
	void Destructor:destroy()
		{
		lib.destroy(handle)
		}
	
	}
Revision history
To propose a new revision to this entity, use dana source put -uc your/new/version.dn -n time.ClockHD -m "reason for update" -u yourUsername
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation