Octave, 22 21 bytes

Saved one byte by changing from while ... end to do ... until.

tic;do
until toc>50;1

tic starts a timer, while toc returns the number of decimal seconds since the last call to tic. We initiate a do - until loop, where we'll loop until toc>50, doing nothing inside the loop. The loop stops after 50 seconds, followed by ans = 1 on the screen.

\$\begingroup\$Welcome to PPCG! It's easier for people to understand your byte count if you just present it as {$^T+50<time?do:redo} (most people will know how to invoke it or those who don't know probably also don't need to know).\$\endgroup\$
– Martin EnderMay 7 '17 at 20:50

\$\begingroup\$Does this require any specific Perl version? The 5.22.2 I have displays “syntax error at -e line 1, near "do:"” immediately.\$\endgroup\$
– manatworkMay 8 '17 at 15:50

\$\begingroup\$@manatwork I verified that you are correct and that it works with perl 5.10.\$\endgroup\$
– gogatorsMay 8 '17 at 20:29

\$\begingroup\$Explicitly, it say "STDERR can be ignored completely, as long as STDOUT has the required output". Which means the same as "STDERR may be considered if STDOUT does not have the required output". In this case STDOUT does not have the required output, so STDERR need not be ignored.\$\endgroup\$
– gogatorsMay 19 '17 at 21:19

C, 4544 43 bytes

\$\begingroup\$is it guaranteed that the puts(f) will always have at least 1 visible character?\$\endgroup\$
– Felipe Nardi BatistaMay 9 '17 at 10:49

\$\begingroup\$@FelipeNardiBatista It will on the implementation I choose (See the link). Otherwise It is necessary to check that the function f isn't aligned to or more than 0xFF bytes. This can be manipulated using compiler flags.\$\endgroup\$
– 2501May 9 '17 at 10:53

Bash, 26 bytes

f()(((SECONDS<50))&&f);f;.

Partially ungolfed:

f () (
((SECONDS < 50)) && f
)
f
.

SECONDS is a magic variable that counts the number of seconds since the shell started. I define a function that recurses until the value is below the threshold. Once the wait is over, run the builtin . which prints an error message because it's missing an argument.

Beware that since the function's body is in parentheses, bash forks a new process for each recursive invocation, which may consume a lot of entries in your process table. A loop would keep resource usage down, but it's longer.

for((;SECONDS<50;));do :;done;.

If you want to have output on standard output rather than to the screen and you're running a sufficiently Unix-like system with at least one user logged in, you can replace the final . by w. If you want to stick to pure bash then I can't think of a way to produce output in less than 28 bytes.

\$\begingroup\$in the console it does outputs 1, but not in the snippet, it just freezes my browser for 5 secs. isn't that a JS REPL answer?\$\endgroup\$
– Felipe Nardi BatistaMay 8 '17 at 14:45

\$\begingroup\$@FelipeNardiBatista I don't know what a JS REPL answer is, but you're right. The previous version of my snippet did output when run. Is it a requirement that it should function when ran as a snippet?\$\endgroup\$
– Thomas WMay 8 '17 at 15:29

The basic idea of this program is to get what the time will be in 50 secs and loop until the current time is equal. So to get the time in 50 seconds, it gets the current time and adds 50. Then, since 05AB1E's clock returns the time since the last minute change, it needs to modulo 60, to get back in the correct range. Then the program loops until the second amount is the same as the desired.

\$\begingroup\$You can save a byte by changing the while to a for and put s inside it: for(long s=t();t()-s<5e4;); Also, I count 109 bytes in your current answer instead of 108 (after removing the newline). With the while to for loop change it becomes 108 however. Also, why use System.currentTimeMillis() when System.nanoTime() is shorter?\$\endgroup\$
– Kevin CruijssenMay 8 '17 at 9:40

This could be shaved down to 16 bytes by replacing the final three instructions with int 18h, which on ancient machines would invoke the ROM built-in BASIC interpreter and almost everywhere else prints something like "No ROM BASIC" and reboot after a key press, but after discussing this with OP it was decided that this wouldn't be allowed.

Interrupt + self-modifying code approach - 23 bytes

This is another approach; it turns out to be bigger, but I post it anyway because it is way more fun.

\$\begingroup\$Is the Elvis operator a thing in PHP? ?:, could save a byte by printing the time()-$t implicitly instead of tabs?\$\endgroup\$
– Magic Octopus UrnMay 8 '17 at 15:01

\$\begingroup\$@carusocomputing Elvis would print the difference or the else branch; i.e. some ASCII between 0 and 49; but there shouldn´t be any printable in the first 50 seconds -> not applicable here.\$\endgroup\$
– TitusMay 8 '17 at 16:52

\$\begingroup\$Welcome to PPCG! It looks like there is some white space left which can be removed, e.g. var t=DateTime ....\$\endgroup\$
– LaikoniMay 7 '17 at 18:49

\$\begingroup\$Not sure where you're getting 79 bytes from, because your code in it's current state is 92 bytes. Even golfed to remove all whitespace it's still 83 bytes\$\endgroup\$
– SkidsdevMay 8 '17 at 8:40

\$\begingroup\$This is 96 bytes if you remove the new lines.\$\endgroup\$
– TheLethalCoderMay 8 '17 at 15:30

\$\begingroup\$As I count, would be shorter without variable $t. And avoid expr, Bash can do integer arithmetic itself. And better list the logged in users with w – not just shorter but produces output on TIO too. for((e=`date +%s`+50;`date +%s`<e;)){ :;};w\$\endgroup\$
– manatworkMay 8 '17 at 16:05

\$\begingroup\$I had no idea that there is a way to do arithmetic without expr command. From what I read so far, it only works if it's done inside ((...)). Thanks for your help!\$\endgroup\$
– Maxim MikhaylovMay 8 '17 at 17:33

\$\begingroup\$Hi, you can shave of 8 bytes of this if you change Console.Write(n) to n.Dump(). .Dump() is a LinQPad specific method not a C# one if I'm not mistaken, so I don't know if that is allowed by the rules. (If it is, it saves 8 bytes)\$\endgroup\$
– Bojan BMay 9 '17 at 6:34

Sets a Timer, reads the timer difference and pushes it on the stack. Pushes 9 and 5, multipl*es them, pushes 6, +dds them. We now have a 51 on the stack (on top of the initially small-ish timer number). We substr-ct them from each other, getting initially something a little bit bigger than 51. We cast it to an integer, and mirror (_) if the integer is truthy (i.e. not 0). In that case, we go to the left (<) and check our timer again, going into a loop. Otherwise, we print 0 from the empty stack, and eXit.

After 50 seconds, the timer will be 50+ε for some small ε, meaning our subtraction yields 50+ε-51 = -ε, since ε is smaller than 1 the corresponding integer will be 0.

\$\begingroup\$That is invalid in my opinion, because the function requires an argument. This is similar to having information stored in globals, but isn't counted in the byte score count. (Or resetting globals in between function calls, which is what the argument is doing basically.)\$\endgroup\$
– 2501May 10 '17 at 7:21

Code Golf Stack Exchange is a site for recreational programming competitions, not general programming questions. Challenges must have an objective scoring criterion, and it is highly recommended to first post proposed challenges in the Sandbox.