This repository was archived by the owner on Apr 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdevPanel.cs
More file actions
46 lines (40 loc) · 1.63 KB
/
devPanel.cs
File metadata and controls
46 lines (40 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace berlinclock
{
public partial class devPanel : Form
{
public devPanel()
{
InitializeComponent();
}
private void DevPanel_Load(object sender, EventArgs e)
{
}
private void Timer1_Tick(object sender, EventArgs e)
{
string synctimer;
string synctimerPreFormat;
long synctimerPostFormat;
synctimer = DateTime.Now.TimeOfDay.ToString();
synctimerPreFormat = new String(synctimer.Where(Char.IsDigit).ToArray());
synctimerPostFormat = Convert.ToInt64(synctimerPreFormat);
label1.Text = "TIME GATHERED: " + DateTime.Now.TimeOfDay;
long hourone = (((synctimerPostFormat / 1000000000000) % 10)), hourtwo = ((synctimerPostFormat / 100000000000) % 10);
long minone = ((synctimerPostFormat / 10000000000) % 10), mintwo = ((synctimerPostFormat / 1000000000) % 10);
long secondone = ((synctimerPostFormat / 100000000) % 10), secondtwo = ((synctimerPostFormat / 10000000) % 10);
long millisecond = (synctimerPostFormat % 10000000);
label2.Text = "HOUR EXTRACTED: " + hourone + hourtwo;
label3.Text = "MINUTE EXTRACTED: " + minone + mintwo;
label4.Text = "SECOND EXTRACTED: " + secondone + secondtwo;
label5.Text = "MILLISECOND EXTRACTED: " + millisecond;
}
}
}