System C# by API

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
public class MainClass{
   public static void Main(){
        DateTime endTime = DateTime.Now.AddSeconds(123);
        while (DateTime.Now < endTime)
        {
            Console.WriteLine(DateTime.Now.TimeOfDay.ToString());
        }
   }
}