Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also: - (hopefully) better consistency - less stopping when the connection is dead. - show latest 10 ping results in menu, including in-flight pings - killed old useless stats - show "(over 10s)" when it's been 10 seconds since the last good ping - show "(no response)" when the past 10 pings have all failed - host the zip on github - update screenshow
- Loading branch information
Showing
13 changed files
with
741 additions
and
277 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
PingMenu.xcodeproj/project.xcworkspace/xcshareddata/PingMenu.xccheckout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>IDESourceControlProjectIdentifier</key> | ||
<string>8D0CB63F-EDCA-4F85-AF2C-4C64EAFE8F2E</string> | ||
<key>IDESourceControlProjectName</key> | ||
<string>PingMenu</string> | ||
<key>IDESourceControlProjectOriginsDictionary</key> | ||
<dict> | ||
<key>72D60F9D-BE25-49C0-BD29-959F89AAC4B7</key> | ||
<string>https://github.com/kalleboo/PingMenu.git</string> | ||
</dict> | ||
<key>IDESourceControlProjectPath</key> | ||
<string>PingMenu.xcodeproj/project.xcworkspace</string> | ||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key> | ||
<dict> | ||
<key>72D60F9D-BE25-49C0-BD29-959F89AAC4B7</key> | ||
<string>../..</string> | ||
</dict> | ||
<key>IDESourceControlProjectURL</key> | ||
<string>https://github.com/kalleboo/PingMenu.git</string> | ||
<key>IDESourceControlProjectVersion</key> | ||
<integer>110</integer> | ||
<key>IDESourceControlProjectWCCIdentifier</key> | ||
<string>72D60F9D-BE25-49C0-BD29-959F89AAC4B7</string> | ||
<key>IDESourceControlProjectWCConfigurations</key> | ||
<array> | ||
<dict> | ||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key> | ||
<string>public.vcs.git</string> | ||
<key>IDESourceControlWCCIdentifierKey</key> | ||
<string>72D60F9D-BE25-49C0-BD29-959F89AAC4B7</string> | ||
<key>IDESourceControlWCCName</key> | ||
<string>PingMenu</string> | ||
</dict> | ||
</array> | ||
</dict> | ||
</plist> |
Binary file modified
BIN
+2.92 KB
(110%)
...deproj/project.xcworkspace/xcuserdata/kalleboo.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// PingEvent.h | ||
// PingMenu | ||
// | ||
// Created by Karl Baron on 2013/07/16. | ||
// | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
|
||
typedef enum PingEventState { | ||
PingEventStateUnknown, | ||
PingEventStateSent, | ||
PingEventStateReceived, | ||
PingEventStateSendError, | ||
PingEventStateErrorUnexpectedPacket | ||
} PingEventState; | ||
|
||
@interface PingEvent : NSObject { | ||
unsigned int sequenceNr; | ||
PingEventState state; | ||
NSDate* sentTime; | ||
NSDate* returnTime; | ||
NSString* resultError; | ||
} | ||
|
||
@property (nonatomic,assign) unsigned int sequenceNr; | ||
@property (nonatomic,assign) PingEventState state; | ||
@property (nonatomic,retain) NSDate* sentTime; | ||
@property (nonatomic,retain) NSDate* returnTime; | ||
@property (nonatomic,retain) NSString* resultError; | ||
|
||
-(NSString*) stateName; | ||
-(double) timeSinceSent; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// PingEvent.m | ||
// PingMenu | ||
// | ||
// Created by Karl Baron on 2013/07/16. | ||
// | ||
// | ||
|
||
#import "PingEvent.h" | ||
|
||
@implementation PingEvent | ||
@synthesize sequenceNr; | ||
@synthesize state; | ||
@synthesize sentTime; | ||
@synthesize returnTime; | ||
@synthesize resultError; | ||
|
||
-(NSString*) stateName { | ||
switch (self.state) { | ||
case PingEventStateUnknown: | ||
return @"Sending"; | ||
case PingEventStateSent: | ||
return @"Sent"; | ||
case PingEventStateReceived: | ||
return @"Success"; | ||
case PingEventStateSendError: | ||
return @"Error"; | ||
default: | ||
return @"Unknown"; | ||
break; | ||
} | ||
} | ||
|
||
-(double) timeSinceSent { | ||
if (!self.sentTime) | ||
return 0; | ||
|
||
if (!self.returnTime) | ||
return [NSDate timeIntervalSinceReferenceDate]-[self.sentTime timeIntervalSinceReferenceDate]; | ||
|
||
return [self.returnTime timeIntervalSinceReferenceDate]-[self.sentTime timeIntervalSinceReferenceDate]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.