Skip to content

Instantly share code, notes, and snippets.

*://*.caixin.com/*
*://*.facebook.com/*
*://*.ftchinese.com/*
*://*.wsj.com/*
@ruleroller
ruleroller / timeTake.m
Last active December 19, 2015 16:14
get the time how the program it takes by second
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
    @autoreleasepool {
       
        //  Read in files as large strings
        NSString *nameList = [NSString stringWithContentsOfFile:@"/usr/share/dict/propernames"
                                                       encoding:NSUTF8StringEncoding
                                                          error:NULL];
        NSString *wordList = [NSString stringWithContentsOfFile:@"/usr/share/dict/words"