Skip to content

Commit

Permalink
feat(ios): Add init action for keccak zkey
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarth committed Nov 11, 2023
1 parent fdb5e4d commit c3fc85f
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions mopro-ios/MoproKit/Example/MoproKit/KeccakZkeyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,23 @@ class KeccakZkeyViewController: UIViewController {

@objc func runInitAction() {
// Logic for init
// TODO: Add this and call init for zkey
textView.text += "NYI: Init\n"
do {
textView.text += "Initializing library\n"
// Record start time
let start = CFAbsoluteTimeGetCurrent()

try initializeMopro()

// Record end time and compute duration
let end = CFAbsoluteTimeGetCurrent()
let timeTaken = end - start

textView.text += "Initializing arkzkey took \(timeTaken) seconds.\n"
} catch let error as MoproError {
print("MoproError: \(error)")
} catch {
print("Unexpected error: \(error)")
}
}

@objc func runProveAction() {
Expand Down

0 comments on commit c3fc85f

Please sign in to comment.