I am new to C# and I had a question about adding a plug to the Cosmos User Kit.
I wanted to have 'date' and 'time' commands like MS-DOS. Here is my code for the 'time' command.
if (code.Substring(0, 4) == "time")
// Command 'time
Console.WriteLine("Time will be displayed here.");
if (code.Length > 4)
// Runs if there is more to the command then just 'time'
I wanted to replace "Console.WriteLine("Time will be displayed here.")" with some code to display the time, but I receive an error when I try to use the DateTime namespace that says I need a plug.
What should I do?
You need to use Cosmos.Hardware.RTC.
Example: Cosmos.Hardware.RTC.Minute, Cosmos.Hardware.RTC.Second, Cosmos.Hardware.RTC.Hour ect. Hope it helps - Matt