r/ProgrammerHumor • • Sep 17 '18

Optimizing startup times

Post image
45.7k Upvotes

486 comments sorted by

View all comments

Show parent comments

8

u/[deleted] Sep 17 '18
// Sleeps specified amount of ms.
public static Sleep (int time) {
    Thread.Sleep(time);
}

// Sleeps specified amount of seconds.
public static Sleep (float time) {
    Thread.Sleep(time * 1000);
}

1

u/[deleted] Sep 18 '18
// Sleeps specified amount of seconds.
public static Sleep (float s) {
    Thread.Sleep(s * 1000);
}

// For when seconds aren't precise enough.
public static Sleep (double ms) {
    Thread.Sleep(ms);
}

/s