Skip to content

Commit

Permalink
Added elapsed timer for creating the output files
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavl committed Oct 18, 2014
1 parent 8f0c9d6 commit 5070ab3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ module Metadata =
module Parse =
/// Parses and converts Markdown files into HTML files.
let markdown() =
let timer = Diagnostics.Stopwatch.StartNew()

for mdFile in Directory.EnumerateFiles(Environment.CurrentDirectory, "*.md", SearchOption.AllDirectories) do
let htmlFile = Path.ChangeExtension(mdFile, "html")
let mdArray = File.ReadAllLines mdFile
Expand Down Expand Up @@ -89,9 +91,12 @@ module Parse =

printfn "%s -> %s" mdFile htmlFile

timer.Stop()
printfn "Done in %f ms" timer.Elapsed.TotalMilliseconds

[<EntryPoint>]
let main argv =
printfn "F# Static Site Generator v0.2"
printfn "F# Static Site Generator v0.2.1"
printfn "Current working directory: %s" Environment.CurrentDirectory

Parse.markdown()
Expand Down

0 comments on commit 5070ab3

Please sign in to comment.