This is the kind of productivity you get when you pay by lines of code
-
'*******************************************************************
'* This puts an application thread to sleep (millisecond)
'*******************************************************************
Function GotoSleep(Milliseconds As Long)
Sleep (Milliseconds)
End Function -
'*******************************************************************
'* This puts an application thread to sleep (millisecond)
'*******************************************************************
Function GotoSleep(Milliseconds As Long)
Sleep (Milliseconds)
End FunctionI say this developer had brilliant foresight and should be given both a raise and a promotion! They must have known that VB's built-in functions would be transitioned to the .Net Framework at some point. Now, they only have to change a single line of code to make sure their entire code base uses
System.Threading.Thread.Sleep()
. They have also created a function rather than a sub, a clever trick in case they ever decide to return a value (e.g., a bool indicating whether or not the sleep operation was successful). Ingenious! -
I say this developer had brilliant foresight and should be given both a raise and a promotion! They must have known that VB's built-in functions would be transitioned to the .Net Framework at some point. Now, they only have to change a single line of code to make sure their entire code base uses
System.Threading.Thread.Sleep()
. They have also created a function rather than a sub, a clever trick in case they ever decide to return a value (e.g., a bool indicating whether or not the sleep operation was successful). Ingenious!Not to mention the magnificent documentation this programmer provided! It's better documented than most code I know :)
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
} -
I say this developer had brilliant foresight and should be given both a raise and a promotion! They must have known that VB's built-in functions would be transitioned to the .Net Framework at some point. Now, they only have to change a single line of code to make sure their entire code base uses
System.Threading.Thread.Sleep()
. They have also created a function rather than a sub, a clever trick in case they ever decide to return a value (e.g., a bool indicating whether or not the sleep operation was successful). Ingenious!Surely, they should return the value while the thread is asleep, and stop returning it when it wakes up? ;)
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
-
'*******************************************************************
'* This puts an application thread to sleep (millisecond)
'*******************************************************************
Function GotoSleep(Milliseconds As Long)
Sleep (Milliseconds)
End FunctionJust a little change will allow for multi-threaded sleeping, i.e. create a new thread which does the sleep thus not blocking the main application :) . Imagine you'd have to do that when you used the built-in function everywhere...
-
'*******************************************************************
'* This puts an application thread to sleep (millisecond)
'*******************************************************************
Function GotoSleep(Milliseconds As Long)
Sleep (Milliseconds)
End FunctionAnd he even included a "Goto" in there somehow. Awesome.
I wasn't, now I am, then I won't be anymore.
-
'*******************************************************************
'* This puts an application thread to sleep (millisecond)
'*******************************************************************
Function GotoSleep(Milliseconds As Long)
Sleep (Milliseconds)
End FunctionThis is another kind of productivity you get when you pay by lines of code:
''' ''' This puts an application thread to sleep (millisecond)
'''
'''
''' The count of milliseconds
'''
Function GotoSleep(Milliseconds As Long)
Sleep (Milliseconds)
End FunctionIn some cases, my signature will be longer than my message...
<em style="color:red"> <b>ProgramFOX</b></em>
ProgramFOX
-
'*******************************************************************
'* This puts an application thread to sleep (millisecond)
'*******************************************************************
Function GotoSleep(Milliseconds As Long)
Sleep (Milliseconds)
End FunctionYou get VB? :-D
Wout