pEpUpdater class
parent
86a093c298
commit
027deb1e65
@ -0,0 +1,20 @@
|
||||
//
|
||||
// pEpUpdater.h
|
||||
// pEpMacOSAdapter
|
||||
//
|
||||
// Created by Volker Birk on 26.05.20.
|
||||
// Copyright © 2020 p≡p foundation. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface pEpUpdater : NSObject
|
||||
|
||||
-(id)init;
|
||||
-(void)updateAll:(NSTimer*)timer;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@ -0,0 +1,31 @@
|
||||
//
|
||||
// pEpUpdater.m
|
||||
// pEpMacOSAdapter
|
||||
//
|
||||
// Created by Volker Birk on 26.05.20.
|
||||
// Copyright © 2020 p≡p foundation. All rights reserved.
|
||||
//
|
||||
|
||||
#import "pEpUpdater.h"
|
||||
|
||||
@implementation pEpUpdater
|
||||
|
||||
const double CYCLE = 7200.0;
|
||||
|
||||
-(id)init
|
||||
{
|
||||
self = [super init];
|
||||
|
||||
if (self) {
|
||||
[NSTimer scheduledTimerWithTimeInterval:CYCLE target:self selector:@selector(updateAll:) userInfo:nil repeats:YES];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)updateAll:(NSTimer*)timer
|
||||
{
|
||||
// update all registered products
|
||||
}
|
||||
|
||||
@end
|
Loading…
Reference in New Issue