OS X: change the dispatch_async in the freeze block to dispatch_after.

This makes it look cleaner.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@92247 e17a0e51-4ae3-4d35-97c3-1a29b211df97
This commit is contained in:
SND\MaddTheSane_cp 2014-11-15 03:44:07 +00:00
parent 8504c3e708
commit eded81ac8a
1 changed files with 1 additions and 4 deletions

View File

@ -589,10 +589,7 @@ otherblock();\
NSString *path = FileTestBlock();
LaunchArg *larg = [[LaunchArg alloc] initWithLaunchOrder:LaunchArgPostRun argument:kPCSXRArgumentFreeze block:^{
if (![EmuThread isRunBios]) {
// TODO: use another API to put up a timer, instead of sleeping
dispatch_async(dispatch_get_global_queue(0, 0), ^{
//Make sure the emulator is running
sleep(5);
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_global_queue(0, 0), ^{
[EmuThread defrostAt:path];
});
}