Skip to content

Commit

Permalink
use a 6-byte timestamp as id
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilmari Heikkinen authored and kig committed Feb 10, 2009
1 parent f8cba5f commit 879b6df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gitbug.ml
Expand Up @@ -150,9 +150,9 @@ let new_normalized_name = xreplaceMulti ["[^a-zA-Z0-9\\s]", ""; "\\s+", "_"]

let new_id () =
let t = timeNow () in
let s = (int t land 0xffff) in
let s = int t in
let fs = int ((t -. floor t) *. 65536.) in
sprintf "%04x%04x%02x" s fs (Random.int 255)
sprintf "%08x%04x" s fs


let readGit cmd args = readCmd ("git"::cmd::args)
Expand Down

0 comments on commit 879b6df

Please sign in to comment.