[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Sleep
- From: <jgiors@...>
- Date: Wed, 13 Oct 2010 11:17:41 -0700
> -------- Original Message --------
> Message: 4
> Date: Wed, 13 Oct 2010 19:20:51 +0200
> From: Henning Diedrich <hd2010@eonblast.com>
> Subject: Sleep
> To: Lua mailing list <lua-l@lists.lua.org>
> Message-ID: <4CB5EA73.7010303@eonblast.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi list,
>
> is there a sleep function that is
> - non-busy
> - allows for ctrl-C
> - doesn't get stuck
> - does not require a C extension
>
> I tried busy, system call and sockets from =
>
> http://lua-users.org/wiki/SleepFunction for the above reasons they don't =
>
> work for me.
>
> Is there a rock offering a simple C-programmed sleep?
>
> It's for a very simple game world tick with the focus on demonstrating =
>
> (other) principles, and ease of getting to run oneself.
>
> Thanks,
> Henning
Since you mentioned this is for a simple game... Are you using a
game-related library, like SDL? If so, check the Lua wrapper of your
game lib for a sleep function. For example, SDL provides SDL_Delay().
John Giors
Independent Programmer
Three Eyes Software
jgiors@ThreeEyesSoftware.com
http://www.ThreeEyesSoftware.com