logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

s3d_mainloop - set mainloop of program

Author

SimonWunderlich
           Author of s3d

s3d                                                                                              S3D_MAINLOOP(3)

Description

       Takes a function as argument. It will loop this function until a quit-event is received. You can pass
       NULL if you have no function to be looped, but its better to sleep some time if you have nothing to do
       anyway to save cpu-time.

            void mainloop(void)
            {
                    usleep(1000); // sleep 1 ms in every cycle
            }
            ...

            s3d_mainloop(mainloop());

Name

       s3d_mainloop - set mainloop of program

Synopsis

#include<s3d.h>ints3d_mainloop(void(*)(void)f);

See Also