Add snapcraft & chocolatey manifests and move code to src

This commit is contained in:
Stone_Red
2026-03-06 00:51:31 +01:00
parent 5efd698772
commit 2a03352169
64 changed files with 302 additions and 5 deletions
@@ -0,0 +1,37 @@
using System;
using System.Diagnostics;
using System.Threading;
using YesNt.Interpreter.Runtime;
namespace YesNt.Interpreter.Utilities;
internal static class ConsoleExtensions
{
public static char ReadKey(RuntimeInformation runtimeInformation)
{
while (!runtimeInformation.Stop)
{
if (Console.KeyAvailable)
{
return Console.ReadKey().KeyChar;
}
Thread.Sleep(10);
}
return ' ';
}
public static void Sleep(int millisecondsTimeout, RuntimeInformation runtimeInformation)
{
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
while (!runtimeInformation.Stop)
{
if (stopwatch.ElapsedMilliseconds > millisecondsTimeout)
{
return;
}
Thread.Sleep(10);
}
}
}