////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// static void MoviesWithActorsInCommon(MoviesDB moviesDB, bool printSep, int width) { long msecs1 = Environment.TickCount; int maxId = (int)moviesDB.MaxMovieId(); int numOfIds = (int)moviesDB.NumOfMovies() / 6; int[] randomIds = RandomInts(maxId, numOfIds, 64798); long count = 0; int misses = 0; foreach (int id in randomIds) { if (moviesDB.MovieExists(id)) { long[] movies = moviesDB.MoviesWithActorsInCommon(id); count += movies.Length; } else { misses++; } } long msecs2 = Environment.TickCount; PrintTime(msecs2 - msecs1, printSep, width); }