Skip to content

Instantly share code, notes, and snippets.

import Foundation
let args = ProcessInfo.processInfo.arguments
guard let filename = args.dropFirst().last.map ({
if let url = URL(string: $0), url.scheme != nil { url }
else { URL(fileURLWithPath: $0) }
}) else {
printe("usage: \(args[0]) FILE")
exit(EXIT_FAILURE)
}
//
// LOOProfiling.h
//
// Created by Marcin Swiderski on 4/12/12.
// Copyright (c) 2012 Marcin Swiderski. All rights reserved.
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//